COSC 072: Computer Science II

Homework 1
Spring 2004

Due: Mon, Feb 26 @ 5 PM
2 points

This homework is to get you familiar with how you'll be submitting projects this semester. You are to

  1. Get sumnums running on your chosen development platform.
  2. Submit the project from gusun using the submit command (Plan A).
  3. Submit the project from gusun as an attachment to an e-mail using pine (Plan B).

Get the sumnums program running on your chosen development platform. At the top of the file main.cc (or the file containing the main function), place the following header comment, with the appropriate modifications:

//
// Homework 1
// Name: <your name>
// ID: <GoCard ID>
// E-mail: <e-mail address>
// Instructor: Maloof
// TA: <TA's name>
// COSC 072
//
// In accordance with the class policies and Georgetown's Honor Code,
// I certify that, with the exceptions of the class resources and those
// items noted below, I have neither given nor received any assistance
// on this project.
//

If you're not developing your project on gusun, then move your code to gusun using SSHWin. You can also use SSHWin to connect to gusun.

Although you may use any C++ compiler to develop your program, it must run under UNIX and must compile using GNU g++. You must also provide a working UNIX Makefile for your project.

If you need to include a message to your TA about your submission, then place the message in a file named README. Place the README file in the project's directory.

Retrieve the submit program by typing at the gusun prompt

gusun% cp /home3/maloofm/submit ./
Place all of your code in a subdirectory named hw1. To create this subdirectory, type
gusun% mkdir hw1
To descend into the directory, type
gusun% cd hw1
All of the files for your project should be in this directory.

To build the project, type make. To execute the project, type sumnums.

To move up from the hw1 directory, type

gusun% cd ..
(Additional UNIX commands at the bottom of this page: HOWTO Compile under UNIX)

Plan A

When you're ready to submit, change the name of the directory to your netid. For example, if your netid is maloofm, then rename the directory hw1 by typing
gusun% mv hw1 maloofm
Create a zip file of the directory and its contents by typing
gusun% zip -r hw1.zip maloofm/*
This command creates a zip file named hw1.zip by recursively (-r) copying all of the files (*) from the directory maloofm/.

To submit the zip file type

gusun% submit -a hw1 -f hw1.zip
hw1 is the name of the assignment (-a) and hw1.zip is the file (-f) to be submitted for that assignment.

The first time you run submit, it will ask for your name, netid, and the course you are taking. You will have to provide this information only once.

Here's a sample transcript:

gusun% submit -a hw1 -f hw1.zip

It appears you've never run this program before.

The program is going to ask for information about you and your course.
It will then save this information in a file named 'student.ser'.  It is
important not to view, move, or modify this file.  You should not have
to provide this information again

What is your name? Mark Maloof
What is your netid? maloofm
What course are you taking (e.g., COSC-071-01)? cosc-072-01
Submitting assignment...
Finished.
gusun%
If the program submits the file successfully, you will receive a receipt by e-mail at the address <netid>@georgetown.edu.

If you make an error, then you will see one of the following six messages:

  1. Course not found
  2. Assignment not found
  3. Student not found in course
  4. Maximum number of submissions reached
  5. Expecting file size and got...
  6. Maximum file size exceeded
If you see one of these messages, chances are you entered something incorrectly, such as your netid or your course number. You can remove the file student.ser by typing 'rm student.ser'. Run submit again to enter the correct values. Submit your project only once.

Once you've submitted your project, it is important to keep an electronic copy on a university machine (e.g., gusun or cssun) that preserves the modification date and time. If we lose your project or the submission system breaks, then we will need to look at the modification date and time of your project to ensure that you submitted it before it was due.

You can also change the directory's name back to the original name. For example,

gusun% mv maloofm hw1
Note that changing the name of the directory does not change the dates of the files in the directory. You can also remove the zip file from your directory:
gusun% rm hw1.zip

The TAs who will be grading your projects this semester are listed on the main page. You must submit your project before 5 PM on the due date.

Plan B

Now, all of this sounds lovely as long as it works. Submit is new software and I wrote it, so we need a Plan B. If you're sure you're running submit correctly and you see an error message labeled as SEVERE, then it's time to execute Plan B. Error messages of this type will involve messages such as "IOException", "SecurityException", and "Can't find host."

Plan B is to use pine (an e-mail client) to submit your zip file as an attachment to an e-mail. Use only pine on gusun to do this. Address your e-mail to cosc072maloof@cs. Do not address it to me, do not address it to your TA.

To accomplish this, at the gusun prompt, type 'pine'. When the menu appears, select the menu item for composing messages (C). In the To field, type the e-mail address cosc072maloof@cs. Attach your zip file. Control-T (symbolized ^T) will give you a list of files. Select the file to attach. The subject should be your netid followed by the extension .zip. For example, if your netid is maloofm, then the subject of the e-mail should be maloofm.zip. There's no need to include anything in the MESSAGE TEXT screen.

Once you've entered this information, the screen should look something like the following:

Finally, type ^X (Ctrl-X) to send the e-mail to the course account.