Homework 2 : Student Records


 


 

Project Description

Write a C++ program that helps UMass faculty to maintain a simple student database. Write the program as a console application (i.e., no graphical interface). Use only the header files iostream, fstream, string and/or vector and write every line of code yourself. You can also use STL libraries to make your implementation easier, but you are not required to do so.

Project Requirements

The program should be console-based.
It displays a main menu
and allows the user to select different options by typing in commands.
At any time, the user can go back to the main menu.

The program is supposed to provide the following functions:

(3.5 pts)

  1. add student

  2. remove student (identified by Student ID)

  3. edit student (ask for a Student ID, then allow the user to change any info of the student with that Student ID.)

  4. print all data on a student (identified by Student ID)

  5. print the names and IDs of all freshmen, sophomores, juniors or seniors.

  6. save all data in the database to a file (filename specified by user)

  7. load the data from a file (filename specified by user)

A student record has the following:

(1.5 pts)

  1. full name: implement as either one string (first and last name)

  2. Student ID: a string of 9 digits (no other characters allowed). No two students can have the same Student ID

  3. year of study (freshman, sophomore, junior, or senior)

  4. gender (male or female)