Assignment 3 – SRS (Student Record System)

Maximum Points = 50

The purpose of this lab is to focus on the study of classes, objects, inheritance and polymorphism.

 

The registrar is designing a new system to manage and process student records.

 

BASIC ASSIGNMENT

a)    Design and implement a base class that represents up to 500 university students. A student has a code (U, G, T), a student ID, last name, first name, and major, hours completed, and GPA.

b)    Design and implement classes for undergraduate, graduate, and transient students where undergraduates have a class level (freshman, sophomore, junior, senior) and transient students have a current university.

c)    Make sure to include necessary constructors, accessors & mutators (gets/sets), and toString methods for all classes.

d)    Design and implement a main class that

a.    reads the data from a file (students.txt) where the first field identifies the type of student (U – undergraduate, G – graduate, T - transient ). Each record consists of the data for the activity with each field separated by #.

b.    After reading in all of the data, your main class should provide a menu that allows the user to do at least four of the following:

                                          i.    Search for a student using a student ID entered by the user.

                                        ii.    Allow the user to add a student to the list of students.

                                       iii.    Print a list of students sorted by student ID.

                                       iv.    Allow the user to compute the average GPA for a specified major.

                                        v.    Print a list of majors and the total hours for all students with that major.

                                       vi.    Remove a student from the list.

                                      vii.    Print the list of undergraduates for a specified class level.

                                    viii.    Print the list of undergraduates separated by class level (CHALLENGING).

                                       ix.    Print a list of students sorted by a field specified by the user (CHALLENGING).

                                        x.    Other approved option.

 

Sample Input

G#000111222#Slick#Grace#Music#12#3.25

U#000123456#Monet#Claude#Art#120#3.45#senior

T#000111333#Von Neumann#John#Computer Science#45#2.12#University of Sofia

 (Due before class on Tuesday, February 24, 2009) Submit a .doc file containing the UML class diagram showing inheritance for all the classes used in your program. [10 pts]

(Due before class on Tuesday, March 3, 2009) Submit your .java files containing your program to the dropbox in WebCT. [50 pts]

 Grades are determined using the following scale:

Grading Rubric  (Word document)