CS 12 - Assignment 7 - Dynamic arrays of classes


CS 12 Homepage

Due Saturday 28th, 11pm, electronic turnin


Collaboration Policy:

This program is designed in part for us to determine how well you are able to program. Thus, every part of the program should be your own original work, and should not be substantially similar to other students' code, or code from books, previous solutions, the web, etc. -- like other skills (e.g., surgery), the only way to really learn programming is to do it yourself. Some collaboration is OK, including discussing the general solution method, and some debugging assistance after a student has tried hard to solve the bug him/herself. We DO encourage you to work with others nearby, so if you get stuck, you can get help. But you should not show your code to another student in order to help that student.
The bottom line is you can talk about the code as much as you like, but you may not write any code for another student, or let another student copy your code.



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


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

    1. Include a member function called get_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)

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 give 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!!!)