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

CMSC 202 Project 0

Using the Submit System

Posted: Sept 3, 2005
Due: Before Project 1

Updates

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
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)
g++ (etc.) is the command to execute for that target

Make and run your project using the following two commands:

make Proj0
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: Thursday, 01-Sep-2005 16:02:33 EDT