Lab - Getting Started in CS II Lab


Objectives


Discussion and How To


Setup for the Assignment

The assignment is named my_name_is

It is assumed your working copy (check Working Copy Setup) is named cs23001 and is in your home directory. If not, adjust as needed

You need to:

Create the directory for this assignment inside the cs23001

Anything that follows the # is a comment (like // in C++). You don't need to type the comments.

  cd                         # Go to your home directory
  cd cs23001                 # Go into the working copy of your programs
  pwd                        # Print working directory, just to show where you're at
  ls                         # No my_name_is
  svn mkdir my_name_is       # USE THIS NAME EXACTLY
  ls                         # my_name_is now present
  svn commit -m "Directory for my_name_is program"

There should be no error messages. If there are error messages, try to fix them or ask your instructor to help.

You can verify the commit with your browser as we did in the discussion. Click the following link then replace "USERNAME" with your username in the browser's location bar

http://svn.cs.kent.edu/courses/cs23001/svn/USERNAME

Assignment


Overview

There are 3 parts to this lab:

  1. View the repository directory with a browser.

  2. Log into your Linux account, create a file in the repository using Linux commands.

  3. Write a program that outputs your name.

Viewing Your Repository Directory

Use the browser to view your repository directory.

Type the following URL in the browser, replace USERNAME with your username.

http://svn.cs.kent.edu/courses/cs23001/svn/USERNAME

Or, you can click on the above link then replace USERNAME in the browser's location box with your username.

Creating a File

Log in to wasp.cs.kent.edu or hornet.cs.kent.edu as explained in the discussion. Your username and password are the same as the those you use to view your repository directory with the browser.

Create a file in the repository. Use the following commands:

  cd                            # Go to your home directory
  cd cs23001                    # Change directory into your working copy
  ls                            # List files and directories, you should see my_name_is
  cd my_name_is                 # Change directory
  touch my_name_is.cpp          # Create the .cpp file for your program
  ls                            # You should see my_name_is.cpp
  w                             # Show who is logged on
  w > who.txt                   # Put the output of the who command into a file
  cat who.txt                   # Show the contents of the file
  svn add who.txt               # Put who.txt under version control
  svn commit -m "svn practice"  # Send the file to the repository

View the file in the repository with the browser.

My Name Is Program

Write a program that outputs My name is followed by your name.

Name your program file my_name_is.cpp.

Use whatever development approach you like.

Compile your program: clang++ -Wall my_name_is.cpp

Run your program: ./a.out

Make sure the file your repository directory, in the subdirectory my_name_is. Compilation will be gone over in more detail in a later lab.

Commit your program.

View the file in the repository with the browser (click on reload if necessary).

There is no project assigned yet so there is nothing else to work on.


Requirements

The following should be true when you are done, NAMES MUST MATCH EXACTLY:

Verify Commit

Use the browser one more time to verify that your work has been committed.

http://svn.cs.kent.edu/courses/cs23001/svn/USERNAME

You can click on the above link then replace "USERNAME" in the browser's location box with your information.

Final Note

Upon completion of this assignment it will be assumed you are comfortable with the skills used in this assignment.

Do not hesitate to ask your instructor if you have questions or problems.


URL: https://data-structures.cs.kent.edu/labs/Lab1
Last update: EST