Assignment 5: A student records database with vectors (group)

Assigned: 10/07
Due: 10/18 at 11:59 p.m.

Libraries You May Use


In this assignment, we will implement a simple DataBase Management System (DBMS) and a database built with the DBMS to store the student records for CSCI325 Fall 2020 class.

What you must implement:

A database class:

A student struct or class (your choice) containing following information of a student:

Note: Please use the std::vector class to store your  data. Do not implement your own vector for this assignment.

You must also implement the following minimum functionality (methods):

Note: In general your methods should not be doing input/output with the user directly. You should interact with the user in the main() and pass information to your methods using parameters.

Data File Format

You should provide a data file for testing purposes. Your program should read and write the same file format (i.e., the file output of your program should be able to serve as your program's input). The format is as follows:

student_id1 first_name1 last_name1 assignment1 assignment2 assignment3 ...
student_id2 first_name2 last_name2 assignment1 assignment2 assignment3 ...
Where each entry has an appropriate value (e.g., student_idi may be 1001001, first_namei may be John, last_namei may be Doe, and assignmenti for this student may be 89).

As your program reads the file you should use insert_sorted to store the data in order (i.e., an unsorted file should get sorted by your program).


Your program's documentation should be consistent with previous assignments (see previous assignments and examples for more information).


You are not being provided with a driver. Instead, you are asked to implement a driver that manages interaction with the user as well as the interaction with your vector-based database. The driver should have a loop that gives the user the following choices:
Welcome to the UTM Proud Database!  You may select one of the following options:
1 Import from a file
2 Export to a file
3 Update a record
4 Add a student
5 Delete a student
6 Select
7 Report
8 Exit this program

Please enter your choice now: [user enters their choice here]
Note that this implies the use of a loop in your main() that allows the user to keep selecting from the list until they are done. Also note that your method behavior should be consistent, and should prevent against simple errors: printing an empty database to a file should result in an empty file, your program should be able to read back in a database that it has written to a file, etc.

What you must turn in.

Electronically a single zip file, with the name Your zip file should extract into a directory with the same name as the zip (please make sure to put your files in a separate directory before submission). Your zip should include all files necessary to compile and run your program including:

Note: Your program must compile and run on CS1 (or a UD lab machine) or it will not be graded. Please see the syllabus for details.