CS 12 - Assignment 6 - Dynamic arrays of classes


CS 12 Homepage

Due via e-turnin by Monday 5/10, 11pm


Collaboration Policy:
Collaboration on home programming assignments is strictly FORBIDDEN.
Programs must represent YOUR OWN original work.
Sharing code or team-coding are not allowed. Copying code from ANY source (any book, current or past students, past solutions, the web, etc.) is not allowed.
Cooperation to the extent of helping to debug, or discussing the general approach to solving the problem is encouraged, but should never involve communicating code or even pseudo-code or explicit algorithms. Your code must be unique.



This assignment requires the FullName class you built for assignment 5.
You may use either your own code from assn. 5, or the posted solution for the class interface & implementation.


First, if you have not already done so, re-write the operational functions in assignment 5 as overloaded operators, rather than named functions (one of the provided solutions for assn5 is already in this form).

Create a class called Student whose member variables are a FullName and a student id number (type long).

    1. Include a member function called input_data( ) to get data from the user (via either console or text file) for insertion into the object,
    2. Also include a function called display_data( ) that displays the student data in a neat format (again, either to the console or to a text file)

Use the input file names_ids.txt to input student data.

Then write a complete program that uses the class to do some useful stuff:

Your application should create a Dynamic Array of type Student; have the user (or input file) first specify the number of students to be entered, and then the actual student data.
Once the data has been entered, give the user the following options:
      a. Display database (i.e. list all student data, one name per line)
      b. Display requested student record (input a student id)
      c. Delete a student record (ditto)
      d. Modify a student record (ditto)

Use appropriate constructors and destructors (remember the Big Three!!!)