Assignment 7 Course & Student Databases
(UML class diagram: Due before class on November 28, 2007) - Maximum Points = 10
(Program: Due before class on December 5, 2007) - Maximum Points = 50
The purpose of this assignment is to use classes of objects in Java to create and manage a database consisting of courses and students.
A) Each Course record consists of a CRN, course title, instructor, actual number of students (assume maximum class size of 35), semester and year of course offering, and the list of students in course. The array of courses will be read from a data file (selected through FileChooser.pickAFile()) where the first line is the number of courses followed by that many course entries. Each entry consists of the CRN, course title, instructors name, and the semester and year taken each separated by commas. For example, the data file might look like:
2
21123, CPSC 1301, Dr. Java, Spring, 2007
81657, ENGL 1101, William Shakespeare, Fall, 2005
B) Each student record consists of an SID, student name, student major, GPA, and the list of courses for the student (assume maximum number of courses is 25). The array of students will be read from a data file (selected through FileChooser.pickAFile()) where the first line is the number of students followed by that many student entries. Each entry consists of the SID, name, major, and the GPA each separated by commas. For example, the data file might look like:
3
909110123, Jimi Hendrix, Music, 3.75
909210122, Leonardo DaVinci, Art/Science, 3.56
909106987, Ada Lovelace, Computer Science, 3.45
C) After loading the two arrays of objects with data from the files, your program will interactively (using the Scanner class, or JOptionPane, or TextFields, or anything else you would like to try) ask the user for student ids and course numbers. For each pair of information, your program will place the student in the appropriate course and assign the course to the student. Use an object method to make sure there are no duplicate students in a course and that the student does not take the same course with the same CRN twice.
D) Once the students are placed in the classes (and classes assigned to students), your program should allow the user to selectively produce a report for a student, a course, all students, or all courses.
E) You MUST define a Course
class (defined in Course.java) and a Student class (defined in Student.java)
and an enumerated type for Semester (defined in Semester.java). Both classes
must have a default constructor along with at least two others, appropriate accessors
and modifiers, and a toString method.
ANNOUNCEMENT: You may do this assignment in teams of two, BUT you must do more than the minimum described above, i.e. add a Picture and/or Sound for each student (with appropriate gets/sets), or use a GUI for the interactive input, or something else appropriate. [NOTE: if you work as a team, both must submit the same program and I must be notified]
Submit all of the .java files containing your program and associated classes and enumerated data types.
Grades are determined using the following scale: