CSCI 2720

Data Structures
Programming Project 0
All Systems Go??
Assigned: Tues, Jan 16
Due: Try it soon so we can work out any problems!
Points: 0

The purpose of this programming project is to familiarize the student with the CS department's facilities, the basics of compiling and running C++ programs, Makefiles, and the submit utility.

Your tasks:

  1. If you don't already have your user name and password, pick it up from the CS department lab, in Boyd 307. Bring your student id. They'll give you a slip of paper with your user name and password.
  2. Log on. You can do this by sitting at a workstation in the lab or by connecting remotely. The workstations in the lab will remote-mount your home directory from atlas, but they'll run the compiler and other programs that are installed on the local workstations. You'll be submitting your programs from atlas, and I'll be testing and grading them there. Thus, you'll want to be sure to test your programs on atlas prior to submitting them.
  3. Programs that will let you connect remotely include the ssh client and putty, among others. You can get ssh as free download from the ssh website. A number of download links are listed. Here's one: http://www.icrew.org/mirror/ssh/SSHSecureShellClient-3.2.9.exe. And here's a link for putty: http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
  4. Make a subdirectory for cs2720.
  5. Within the cs2720 subdirectory, create a p0 subdirectory.
  6. Using a text editor, create two files: the file p0.C and a Makefile. Use a "real" text editor. Don't use wordpad on your windows machine and transfer the files back and forth. Don't use pico. Learn something like emacs. (I use vi -- I learned to use it 20 years ago and I'm highly productive with it, but I wouldn't recommend it over emacs.) There's a learning curve to using emacs or vi. You'll be slow at first, but the editing power it will provide you with will be well worth the initial time and effort.
    Emacs has a tutorial built into it. (Just type emacs at the command line and you'll see the tutorial listed.) Also, you can google on emacs tutorial and take your pick. Here's one I found: http://www.lib.uchicago.edu/keith/tcl-course/emacs-tutorial.html
    Similarly, if you want to learn to use vi, you can google to find tutorials. Here's one I found at Purdue: https://engineering.purdue.edu/ECN/Resources/KnowledgeBase/Docs/20020202121609 .
  7. On atlas, check that you're using the g++ program that is in /usr/local/bin. Check it by typing "which g++". If you get back
    /usr/local/bin/g++
    
    then you're all set. (Actually, I'm in the process of checking on this /opt/sfw/bin/g++ might be more recent -- will let you know soon. Either one should work just fine for this assignment.) If not, then you should update the path listing in your .cshrc file. We'll demo how to edit this in class. Don't use pico to edit it! If you do, it will break all the long lines and you will have trouble doing anything at all because you'll lose all of your paths.

    After you change this file, you'll need to activate the changes. You can do this by logging out and then logging in again or by "sourcing" the file by typing "source .cshrc". This will work only for the current session. That is, you would need to do this in every open terminal window that you wish to use the new settings from.

  8. Write a short program that does the following:
  9. Write a makefile that will compile the program using g++ and write the executable to a file named p0. See http://www.gnu.org/software/make/ for more info about makefiles.
  10. run the program with the command line arguments "joe shmoe eats worms" and write the output to a file named out.txt. My sample output is here: out.txt .
  11. Delete the executable and submit the p0 subdirectory to the cs2720a account. You submit a program in the following manner:

Questions, Comments to: eileen@cs.uga.edu.
Last updated 8/23/05.