Homework Assignment 3 - Due Saturday, February 9, before 11:59PM

For this assignment you are to write an application that will maintain a collection of stocks (which we will call a Portfolio). The following UML diagram shows the three main classes that will be needed for this project.

Figure 2. Portfolio UML class diagram

Portfolio UML class diagram

Here are some clarifying comments about these classes.

Submitting Your Homework .  For this assignment you are to follow the procedure outlined below. Please read these instructions carefully.

  1. First create a directory named hw03 which will contain all of the source code and data for this program and nothing else.

  2. Design, code, compile, and thoroughly test the program.

  3. Make sure that your program files each begin with a substantial comment section that includes:

    • your name

    • program name

    • a brief description of the contents of the file

    • the date of your last modification to the file

  4. Make sure that your source code does not contain any lines that are longer than 79 characters.

  5. Each function should have a comment section that briefly explains what the function does and how to use it.

  6. When you are ready to submit your work, cd to your hw03 directory and prepare a script file as follows:

       script hw03script          // open the script file
       cat firstfile             // list each of your program file(s)
       cat secondfile...(etc.)   // into the script. (see note below)
       make                      // compile your program
       ./a.out                   // give a good demo of your program
       exit                      // close the script file
    

    [Note: If you have pairs of files such as: thing.h and thing.cpp ALWAYS list the .h file first and then the .cpp file.]

  7. Prepare a gzipped tarball that contains your script file and also all of your source code files and data files so that I can build and run your program. To do this, first delete all backup files and all binary files from each program directory. Then, from the hw03 directory, issue the following command:

      tar -czf yourname-hw03.tar.gz  * 

    This command will create a compressed archive containing all files in the directory as well as any subdirectories, so make sure that you delete all backup~ files and binary files that may have been produced while you were editing and debugging your program.

  8. Finally: Mail your tarball as an attachment to:

     ezust@mcs.suffolk.edu 

    Make sure that you have a Subject: line that says: HW03

DO NOT DELETE YOUR SCRIPT FILE UNTIL I HAVE GRADED AND RETURNED IT TO YOU.