| Homework #1 |
CMSC 389C |
| Due: Wednesday 1/4 at 11:00 pm |
C++ Programming |
Hello World!

Objective
Let's make sure everything is set up correctly and that everyone is able to submit homeworks and projects...
Elaborate Instructions for this Formidable Assignment
- Login to your Grace account using an SSH client. (There is a link to a good one on the
"resources" page). The hostname to use is
"linux.grace.umd.edu". Your login ID and password are your usual University of Maryland login ID and
password.
- You should probably create a "soft link" to the class directory on Grace. This will let you
get into the class directory
quickly instead of having to type a long path name each time. To create a
softlink called "389c", type:
ln -s /afs/glue/class/winter2011/cmsc/389c/0101/ 389c
- If your soft link is working, you should now be able to get to the class directory by typing:
cd 389c
If it doesn't work for some reason, you can always get there by typing:
cd /afs/glue/class/winter2011/cmsc/389c/0101/
- Go into your own directory. You'll find a directory that matches your login ID inside
the directory called "student". Go into your personal directory now.
- You will need to get a copy of the homework #1 files. Type:
cp -r ../../public/HW1 .
(Notice the "space dot" at the end. Also, don't forget to use the -r option.)
That should give you the necessary files in a directory called HW1. By the way... If you
use the UNIX wildcard (*) to copy the files you will be missing one. There is a hidden file
called ".submit" that you'll need to submit your project.
- Inside the HW1 directory you will find a file called
helloWorld.cpp.
That is the one you need to fix up. Edit it with your favorite text editor.
The output from the program should be:
Hello World
Goodbye World
- We're using Makefiles (which I will provide) for all coding assignments during this course. To compile your project, and
simultaneously run the public test(s) on it, go to the command line and type:
make
If you pass the public test(s) it will say "passed" at the bottom -- otherwise it will say "failed".
- Before attempting to submit the assignment, type:
tap -q java
This will load the version
of Java that is needed to run the submission program. (If you don't want to have to do this
for each project, you can just put this command inside your .cshrc.mine
file. If you took
CMSC 216 you probably already have it there.)
- To submit the assignment, make sure you are inside the directory HW1 and then type:
java -jar submit.jar
The first time you submit it will ask you to authenticate -- use your University of Maryland directory
ID and password.
- After you've submitted, go to the Winter submit server to
see if you're passing the tests. For this overwhelming exercise there is one public test and one release test. The
public test is checking the first line of the output; the release test is checking the second line.
Good luck.
Web Accessibility