11 Points
The purpose of this assignment is for you to learn how to send email, how to post messages to newsgroups, and how to write a simple program. Every Duke student is given an account on the Public Unix Clusters. If you are a new student, the account login id and password should have been mailed to you. If you have been here awhile and don't know your login or password, you can get this by visiting the Office of Information Technology (OIT) on the first floor of the North Building. The book "Introduction to the Public Unix Clusters at Duke", which is available at the Gothic bookstore, explains how to login, send mail, and read newsgroups.
You can receive help in lab, from your instructor, and your TA.
Your note must have the subject:
CPS 6, FirstName LastName
For example if your name is Alan Turing, then your subject would be:
CPS 6, Alan Turing
To find out the e-mail address for your instructor, you should check the CPS 6 home page, which is at the URL address:
http://www.cs.duke.edu/~dr/cps6.html
You should receive a reply back acknowledging receipt of your message. If you do not receive an email note back within 24 hours (not counting the weekend), you may not have sent the email message correctly, try again.
In lab 1 you should have created a directory called cps6. Change into that directory using the "cd" command by typing "cd cps6" and create another directory called "assign1" using the "mkdir" command by typing "mkdir assign1". Change into the "assign1" directory using the "cd" command by typing "cd assign1". If you did this correctly, when you type "pwd" you should see a long path name that ends with "/cps6/assign1."
You will also need one of the generic Makefiles we used in both Labs 1 and 2. Copy one of these files into the assign1 directory. You'll be told how to be explicitly told how to do this in this assignment only! From within the proper directory, type:
cp ~dr/cps6/Makefile .
The file Makefile will make it easier to compile as it automatically invokes the g++ compiler and links to libraries you'll need for this assignment. To compile the program called design.cc, type "make design"
For each of the programming problems that follow, you should use the style rules discussed in class, which includes meaningful variable names, indentation, and comments at the top of the file and for each function.
If your program compiles correctly, the executable file called "design" will be created. Then you can type "design" in your xterm window to run your program.
Write a C++ program called design.cc that will print out a design multiple times. Here is some sample output:
>design
---->>>>>***<<<<<----
---->>>>>***<<<<<----
---->>>>>***<<<<<----
First type in the include statement to #include <iostream.h>. Then
write
a main function that will call a printline() function three times. This
printline() function will cout one line of the design above. Please feel
free to change this design in any way you wish. Be creative!
Test your program by compiling and running it.
Every assignment must have a README file submitted with it (please use all capital letters). Include your name, the date, and an estimate of how long you worked on the assignment in the README file. You must also include a list of names of all those people with whom you collaborated on the assignment or lab. So for this lab, create a file named README using emacs. Then submit electronically by typing
~dr/bin/submit6 assign1 design.cc README
You'll
get a message if the submit was successful. To see the files you
submitted type submit6 assign1 without any file names after
the assignment name. This should show you a list of the files you submitted.