UMBC CMSC 202
UMBC CMSC 202 CSEE | 202 | current 202

CMSC 202 Project 0

Using the Submit System

Assigned Monday September 4, 2006
Program Due EXTENDED Friday September 15, 2006 at 11:59pm
Updates
  • Sept. 10 - the submitmake and submitrun scripts have been modified - so they should be working now.
  • Sept. 8 - the submission system is UP AND RUNNING [Thanks OIT!]. You may now attempt to submit your work to Proj0. If you have difficulties, don't panic, email dana3@umbc.edu and the situation will be corrected. Please be certain that the submission system is working for you before the 15th, you will not be given any leniency if you cannot submit Hw1.
  • Sept. 8 - since the submission system is still not up and running (OIT admins are working on it), Project 0 has been extended.
  • Sept. 4 - submission system is NOT configured yet, do NOT attempt to submit your work, it will not succeed.

Objective

Explanation

You will be submitting all of your projects using the submit program.

The Task

Setup

At the Linux prompt, give the following two commands:

touch Proj0.cpp
submit cs202 Proj0 Proj0.cpp

The command touch Proj0.cpp creates an empty file called Proj0.cpp.
The submit command has four parts: the word submit, followed by the class name (cs202), followed by the name of the project (note uppercase P), followed by the name of the file(s) to be submitted.

After entering these commands, you should get a confirmation that submit worked okay. Specifically, the confirmation will say:
Submitting Proj0.cpp...OK

If not, send an e-mail to Ms. Wortman about the problem. In the e-mail, list the section of CMSC 202 in which you are enrolled. Please cut and paste the command you typed and the error message that was displayed into your message.

Now use touch and submit to create another file called bogus.cpp and submit it under Proj0.

You can check your submission by entering submitls cs202 Proj0
You should see the name of the file that you just submitted -- in this case, Proj0.cpp.

Hello World

Using your favorite UNIX editor (ex: emacs or vi), alter the Proj0.cpp file to include the following "Hello World" C++ program:
#include <iostream>

using namespace std;

int main()
{
  cout << "Hello World" << endl;
  return 0;
}
Save your Proj0.cpp and then submit it again (this will overwrite your original empty file).

Make

Using your favorite UNIX editor (again...), create a new file named "makefile". Using the following makefile tutorial, create a makefile that will build a target executable called Proj0, from the source code file Proj0.cpp, using the command
g++ -o Proj0 Proj0.cpp.

Here's what your makefile should look like:
(Note: the <TAB> should be an actual TAB, not the letters... and there is NO space after the tab - it MUST be the only thing on the line preceeding the command)

Proj0: Proj0.cpp
<TAB>g++ -ansi -Wall -o Proj0 Proj0.cpp
Let's take this apart, in the first line:
Proj0 is the target (i.e. the name associated with this set of commands)
Proj0.cpp is the dependency (i.e. the files that are needed to build the target)

In the second line:
<TAB> is required by the 'make' operation
g++ (etc.) is the command to execute for that target
-ansi forces the compiler to use the ansi-standard
-Wall enables all warnings
-o Proj0 specifies that the executable created be named Proj0
Proj0.cpp is the name of the file to compile

Make and run your project using the following two commands:

make Proj0
Proj0

The first command will 'make' a target named 'Proj0'. If no target exists, a makefile error will be reported. This second line runs the executable 'Proj0'. "Hello World" should have printed. If you are having problems, please ask a friend, post to the message boards or come see a TA or your Instructor.

Submit your makefile.

Verification

Now we want to verify that all of our files are in the right place and can be successfully made and run in the remote location. Using submitmake, submitrun, and submitrm (Instructions for Submittal Tools), do the following:

Grading

Although this project carries no points and does not count toward your grade, you must do this project. If you do not do the project, you will get no mercy if you cannot submit future projects.

Self-Check

Did you...


Last Modified: Sunday, 10-Sep-2006 18:42:45 EDT