you are to implement a software for the computer science department at sac state thi 5152002
You are to implement a software for the Computer Science department at Sac state. This software needs to keep track of the students, courses offered by the department. In order to implement this software the following classes must be implemented. Notes 1. To add an object to the list must make sure that the object is not In the list 2. To remove an object to the list, the object must be in the list otherwise throw a custom made exception called ObjectNotFoundException 3. Accessing a list that is empty, must throw an EmptyListException 4. Must implement all the classes based on the provided UML 5. To sort the list copy all the elements to an arrayList then sort it. 6. To search the list copy your linkList to arrayList, sort it, then do a binary search. 7. You need to implemt a method to copy of the elemets of your link list to array list . 8. To search the list, you must sort the list using bubble sort, or selection sort, or insertion sort. 9. Sequential search is not allowed. To search a list you must sort it first then use binary search. 10. Feel free to add any more functionality that you want 11. To create the list of the courses visit CSC website 12. You are not allowed to use the prewritten java LinkList class. 13. If the UML indicates a link list you must use a linklist otherwise you will get a zero credit. 1. Following are the UML diagrams for the classes that needs to be implemented. 1. List interface +add(Object o) Inserts the object to the end of the list +remove(Object o) Removes the object from the list +insert(int position , Object o) Add the object at the given position +search(Object o): Object Search the list to find the given object +size(): int Returns the size of the list +insert(Object o, int position) Insert object at the given position +sort() Sorts the element in the list +copy():List Returns a copy of the list +isEmpty(): boolean Determines if the list is empty or not +addFirst(Object o) Adds the object to the beginning of the list +toString() Returns a string representing the objects store in the list 2. Course class -units : int -number: int -name : String -preRequisite : Course -section: int -instructor //of type person +Course(units,number,name,prerequisite,section,instructor) getter setter equals (Object o) Compare based on the course number +toString compareTo (Object) Compares base on course number 3. Class StudentCourse , extends the course class, implements comparable and serializable. This class has two instance variables called grade, and year, semester. Provide the constructor, setters , getters, equals and compareTo methods. This class inherits all the other methods from its parent class -grade -year -semester Grade for the course Year the course is taken Semester the course is taken +StudentCourse(grade,year,semester) +getters +setters +comapreTo +equals +toString 4. Person class implements Comparable class and Serializable class. Must use custom made exception handling – String name – String lastName +Person(name,lastName) Instantiates an object of person class +getter methods +setter methods: void +equals method: boolean +toString():String +compareTo(Object o) Compares based on the last name 5. Class StudentCourseNode -StudentCourse course -StudentCourseNode next +StudentCourseNode(StudentCourse) Instantiates the StudentCourse object +getNext(): next +getCourse(): StudentCourse +setNext(StudentCourse c) Sets the reference next to c 6. Class CourseList implements the interface List, comparable and serializable. All the methods from the List class must be implemented in order to add, remove, sort,… course StudentCourseList class -StudentCourseNode front +StudentCourseNode(StudentCourse c) Instantiates the first node in the list 7. Student class, extends Person class, implements comparable and serializable -major -myCousreList : a link list of the StudentCourseList -majorUnits //units required for the major -id +Student(id,name,lastName,phone,major,majorUnits,id) +getter methods +setter methods +equals(Object o) +getUnitsCompleted() +getsUnitLeft() Compares the last name +toString():String compareTo(Object o) Compares two students based on the id +getGpa(): double Returns the gpa of the student. Do not declare gpa as an instance ariable 8. StudentList class has an instance variable ArrayList of students. This class implements the interfaces List, comparable and serializable. This class must implement all the methods declared in the List class. 9. CourseNode class -Course c -CourseNode next +CourseNode(Course c) Instantiates a node +getNext(): CourseNode Returns the reference to the next node in the list +setNext(CourseNode n) Set next to n 10. CourseList class implements the interface List, comparable, serializable. You must implement this class using a link list. Must implement all the methods from the List interface. Implement any other methods. -CourseNode front +CourseList(Course c) Instantiate the front to the course c 11. Driver class needs to provide the following menu. For each option a methods must be written in the driver class. a. Create two files i. List of the students. ii. List of CSc courses. Mulitiple sections of one course must be included in this file b. Create i. An object of StudentList 1. Populate the list by reading from a file ii. An object of CourseList 1. Populate the list from the file iii. Provide the following functionalities(options menu) 1. List all the students in the list 2. List all the courses in the list 3. Student options a. Display the list of the courses taken b. Display the gpa c. Add a course to the list. If the course is already taken with a passing grade, then student cannot take it. If the student has not taken the pre requisite the student cannot take the class. d. Remove a course from the list. Courses with an assigned grade cannot be removed. e. Output the units taken so far f. Display units left to take g. List all the courses taught by a particular instructor h. List all the sections for a particular course. i. Add any other feature/s of your choice 4. Admin options a. Add a new course to the list of courses b. Remove a course from the list c. Add a student to the list of the students