CS 1704 Summer II 2003 

Project 2:  Multimedia Organizer


Changes are in red.

Purpose:

1.                  To  apply new-gained object oriented design principles, and 
2.                  To exercise the use of classes.

Requirements:

For this project, I will require:

  1. Three, and only three classes as defined below,
  2. One of the classes will hold two arrays each sized 100.
  3. You may not use dynamic data.
  4. You must submit a software engineering design document BEFORE beginning work on any      coding.
  5. You must use at least 3 testing switches, named 1 2 and 3.
  6. At least 3 assert statements (more is suggested).

The Project

You will be implementing a console, command line based Multimedia Organizer.   The basic idea is that your current Video, CD, DVD, cassette, etc collection should be able to be organized along with other students' collections so that we have a huge database of multimedia items that can be borrowed, traded, etc.

The first class you will create will hold student information.  Each "student" should store that student's name, phone number, email address, street name with number, apartment letter and/or number, city, state, zip code, and other.  (We will assume each student has standard U.S. addresses).  Each student class should provide access functions to private data to update/view the information.  Additionally, each student should be able to print to a stream (this will be explained in class) in the following format, where italics represent sample information:

Name:  
    Solomon S. Gifford
Phone Number: 
    (540) 555-1234
E-mail: 
    sgifford@vt.edu
Address:
    1776 Liberty Lane
    Apartment #25
    Blacksburg, VA 24060
Other:
    I am an Instructor...btw, my cell is (540) 555-4321.

Please use whitespace before the data, and note that the telephone format is formatted by you.  Leading spaces may either be multiple spaces or tabs, your call.  Do not print an extra blank line before or after the data.  In some cases, one or more fields will be left blank.  In those cases, do not print the field heading.  You can assume the email address will always be present.  For example, if a student did not leave his phone number or address, his information would look as follows:

Name:  
    Solomon S. Gifford
E-mail: 
    sgifford@vt.edu
Other:
    I am an Instructor...btw, my cell is (540) 555-4321.

The second class will be a multimedia item.  Each item will have a name, a type, an author, an owner (which will be a student email), a price, and a field indicating whether the item is one of the following:  will sell, will rent, will trade, will lend, or none of the above.  Each student class should provide access functions to private data to update/view the information.  Additionally, each item should be able to print to a stream (this will be explained in class) in the following format, where italics represents sample information:

Item:
    I Surrender All
Media Type:
    CD
by:
    Clay Crosse
Owner:
    sgifford@vt.edu
Price:
    $4.50
Availability:
    Will Rent

As with the student's data, please use whitespace before the data, and note that the price format should include the cents in two digits.   Leading spaces may either be multiple spaces or tabs, your call.  Do not print an extra blank line before or after the data.  In some cases, one or more fields will be left blank.  In those cases, do not print the field heading.  You can assume the email address will always be present.  Also, an item can only be added if a student with that email address exists.  The only additional requirement is that your print method must provide the option to turn off printing of the Owner field.

You will then create a third class that will manage the first two classes by storing an array of students and an array of multimedia items.  This class will initially (constructor, we'll learn this in class) open two files.  The first will be a list of students with accompanying information named "students.data".  The second file will be a list of multimedia items named "items.data".  Additionally, this class will provide methods that implement the commands listed below.  Note:  you must only provide methods to implement the commands, not get the commands from the command file and not to parse the commands.

The commands will be read from a file named "commands.data" and will not be read nor parsed by the classes.  All output will be written to a file named "output.data".  Echo each command to the file and then display each command's output.  The functions are as follows: 

print students

print items

print <emailaddress>

add item 
@Item:
I Surrender All
@
Media Type:
CD
@
by:
Clay Crosse
@
Owner:
sgifford@vt.edu
@
Price:
$4.50
@
Availability:
Will Rent
@@

add student 
@Name:  
Solomon S. Gifford
@
Phone Number: 
(540) 555-1234
@
E-mail: 
sgifford@vt.edu
@
Address Line 1:
1776 Liberty Lane
@
Address Line 2:
Apartment #25
@City:
Blacksburg
@State:
VA
@Zipcode:
24060
@
Other:
I am an Instructor...btw, my cell is (540) 555-4321.
@@

delete <emailaddress>

quit

Standards:

As with all programming projects in this course, please see http://courses.cs.vt.edu/~cs1704/summer2003/standards.htm for a list of requirements that apply to all projects.  YOU WILL BE GRADED on these.  In addition, include the following pledge at the bottom of your file:

On my honor:

- I have not discussed the C++ language code in my program with anyone other than my instructor or the teaching assistants assigned to this course.

- I have not used C++ language code obtained from another student, or any other unauthorized source, either modified or unmodified.

- If any C++ language code or documentation used in my program was obtained from another source, such as a textbook or course notes, that has been clearly noted with a proper citation in the comments of my program.

- I have not designed this program in such a way as to defeat or interfere with the normal operation of the Curator System.
<Your Name>

Submission

Name your file <yourpid>.cpp before 12:00 midnight of Wednesday, July 16, 2003.  To receive credit, your assignment must be submitted before the time and date listed above. The curator can only accept a limited number of submissions per minute, so curator lag is not an excuse for submitting late. It is your responsibility to successfully submit your assignment via the curator, so plan to submit early.  A maximum of five submissions is allowed per student, so DO NOT USE THE CURATOR FOR TESTING!  Only the final submission will be graded, not your highest grade.  In addition, 2 points will be added for every day early your last/graded submission was turned in for a max of 10 points.

          Submit to:  http://www.cs.vt.edu/curator/