project 1 project school database use the uml provided below to develo
Search for question
Question
Project 1
Project School Database
Use the UML provided below to develop the necessary Java classes.
Follow the OBJECTIVES & GRADING RUBRIC to develop your project and meet the requirements
Use the Initial Text File and Sample Output provided at the end of this file to complete the I/O
portion
SUBMISSION INSTRUCTIONS:
1. Submit your source code to zybook for grading using the test cases that have been
provided for the project. (65 points)
2. Record a 5-10 minute video of the project running through the steps to demonstrate the
functionality as you explain it. (35 points) Explain the code in depth and cover all points from
the rubric in order.
3.
Upload your video to YouTube and provide the link as a comment in your code at the top
of the Driver_SchoolDB java file. (The visibility of your video must NOT be private. It CAN be
unlisted)
NOTE: Video explanation and code must both be submitted by the deadline to earn credit, even if the
program is not fully functional. Any code submission without a video is NOT eligible for grading and will
be marked with a score of zero.
Course
- is Graduate Course: boolean
- courseNum: int
- courseDept: String
- numCredits: int
+ Course (boolean isGraduateCourse, int courseNum, String courseDept, int
numCredits)
+ is Graduate Course(): boolean
+ getCourseNum(): int
+ getCourseDept(): String
+ getNumCredits(): int
+ getCourseName: String
+ equals(Object obj): boolean
be considered equal
+ toString(): String
//return String of “U” or “G” + courseDept + courseNum
//all attributes must match for 2 Course objects to
//"Course: %3s-%3d | Number of Credits: %02d |
Graduate/Undergraduate”, courseDept, courseNum, numCredits, isGraduate Course
+ compareTo(Course c): int //use the Comparable interface specification. Sort by|
courseNum
Person name: String
- birth Year: int
+ Person()
// name =
6699
birth Year = 0
'
+ Person(String name, int birth Year)
+ getName(): String
+ getBirth Year():int
+ setName(String name): void
+ setBirth Year(int year): void
+ equals(Object obj): boolean
objects to be considered equal
toString(): String
//all attributes must match for 2 Person
//"Person: Name: %30s | Birth Year: %4d", name,
birth Year compareTo(Person p): int
specification. Sort by birth Year.
//use the Comparable interface
Employee extends Person
- deptName: String
- numEmployees: static int
- employeeID: int
//generated
+ Employee()
// deptName
6699
=
'
employeeID computed
// employeeID computed
+ Employee(String deptName) // employeeID computed
+ Employee(String name, int birth Year, String deptName)
+ getDeptName(): String
+ static getNumEmployees(): int
+ getEmployeelD(): int
+ setDeptName(String deptName): void
+ equals(Object obj): boolean //all attributes inherited+local must match for 2
Employee objects to be considered equal
+ toString(): String
Employee Number: %3d", deptName, employeeID
+ compareTo(Person p): int
employeeID
//"<content of Person> Employee: Department: %20s |
//use the Comparable interface specification. Sort by
Faculty extends Employee
courses Taught: Course[]
number of courses a faculty has
// you can assume that the maximum
// taught cannot exceed 100
boolean
numCourses Taught: int
//controlled variable - isTenured: + Faculty()
// courses Taught = [], numCourses Taught = 0, is Tenured = false +
// courses Taught = [], numCourses Taught = 0,
Faculty(boolean is Tenured)
this.isTenured = is Tenured
+ Faculty(String deptName, boolean is Tenured)
+ Faculty(String name, int birth Year, String deptName, boolean is Tenured)
+ is Tenured():boolean
+ getNumCourses Taught(): int
+ setls Tenured (boolean is Tenured): void
+ addCourse Taught (Course course): void
array
+ addCourses Taught(Course [] courses): void
array
+ getCourse Taught(int index): Course
"null" if invalid
+ getCourse TaughtAsString(int index): String
invalid
+ getAllCourses TaughtAsString(): String
method
+ equals(Object obj): boolean
objects to be considered equal
+ toString(): String
Taught: %3d |
//appends course to the end of the existing
//appends courses to the end of the existing
// note: index must be verified. Return
6699
// note: index must be verified. Return “” if
// returns "courseDept-courseNum"
// comma separated list of all courses taught
// uses getCourse TaughtAsString(int index) as a helper
//all attributes inherited+local must match for 2 Faculty
//"<content of Employee> Faculty: %11s | Number of Courses
Courses Taught: %S", Is
Tenured/Not
Tenured
numCourses Taught,
getAllCourses TaughtAsString()
+ compareTo(Person p): int
// use the Comparable interface specification, sort by
// numCourses Taught
GeneralStaff: extends Employee
- duty: String
+ GeneralStaff()
+ GeneralStaff(String duty)
// duty
6699
=
+ GeneralStaff(String deptName, String duty)
+ GeneralStaff(String name, int birth Year, String deptName, String duty)
+ getDuty(): String
+ equals(Object obj): boolean //all attributes inherited+local must match for 2 Staff objects
to be considered equal
+ toString(): String
//"<content of Employee> GeneralStaff: Duty: %10s”, duty
Note: do not override the inherited compareTo from the Employee class (use as is)
Student: extends Person - numStudents: static int
- studentID: int
- courses Taken: Course[ ]
- numCourses Taken: int
- is Graduate: boolean
- major:String
+ Student()
//generated
//initialize to length of 50
//controlled variable
//"undeclared" default value
/// courses Taken = [], numCourses Taken = 0, is Graduate = false
+ Student(boolean is Graduate)
+ Student(String major, boolean is Graduate)
+ Student(String name, int birth Year, String major, boolean isGraduate)
+ is Graduate():boolean
+ getNumCourses Taken(): int
+ static getNumStudents(): int
+ getStudentID(): int
+ getMajor(): String
+ setlsGraduate(boolean isGraduate): void
+ setMajor(String major):void
+ addCourse Taken (Course course): void
+ addCourses Taken (Course []) courses): void
array
+ getCourse Taken(int index): Course
invalid
+ getCourse TakenAsString(int index): String
invalid
+ getAllCourses TakenAsString(): String
method
+ equals(Object obj): boolean
objects to be considered equal
+ toString(): String
//appends course to the end of the existing array
//appends courses to the end of the existing
// note: index must be verified. Return "null" if
6699
// note: index must be verified. Return “” if
// returns "courseDept-courseNum❞
// comma separated list of all courses taught
// uses getCourse Taken AsString(int index) as a helper
//all attributes inherited+local must match for 2 Student
//"<content of Person> Student: studentID: %04d | Major%20s |
%14s | Number of Courses Taken: %3d | Courses Taken: %s", studentID, major,
Graduate/Undergraduate, numCourses Taken, getAllCourses TakenAsString()
+ compareTo(Person p): int
numCredits
//use the Comparable interface specification, sort by
OBJECTIVES & GRADING RUBRIC:
To earn a grade, the project video must be submitted as described in the submission instructions below.
1. (5 pts) Course class completed as per UML and passes zybook test cases
2. (5 pts) Person class completed as per UML and passes zybook test cases
3. (5 pts) Employee class completed as per UML and passes zybook test cases
4. (5 pts) GeneralStaff class completed as per UML and passes zybook test cases
5. (10 pts) Faculty class completed as per UML and passes zybook test cases
6. (10 pts) Student class completed as per UML and passes zybook test cases
7. (5 pts) Fields of all classes completed as per UML and confirmed via zybook test cases
8. (5 pts) Read from file (the path and filename should be "SchoolDB_Initial.txt")
9. (5 pts) Display the plain text file content on the console
10. (5 pts) Create the Objects as specified from the file content 11. (5 pts) Using the toString() method of each object, display all the objects to the console in
the following order (See sample output below):
All Course objects
• All Person objects
• All Employee objects
• All GeneralStaff objects
⚫ All Faculty objects
• All Student objects
12. (25 pts) Create a menu that will interact with the user and do the following:
a. (3 pts) Create 3 new Course objects based on input
b. (3 pts) Create 3 new Faculty objects based on input
c. (3 pts) Create 3 new GeneralStaff objects based on input
d. (3 pts) Create 3 new Student objects based on input
e. (2 pts) Add 2 new Courses to a Faculty object
f. (2 pts) Add 2 new Courses to a Student object
g. (1 pts) Add an array of 2 Courses to a Faculty object
h. (1 pts) Add an array of 2 Courses to a Student object
i. (1 pts) Get the Course at index (valid and invalid indexes) from a Faculty object
j. (1 pts) Get the Course at index (valid and invalid indexes) from a Student object
k. (1 pts) Allow the user to select a Faculty object and a Course object from menus and
query the Faculty object for the Course to determine whether the Faculty object
teaches it or not.
I. (1 pts) Determine which Faculty object teaches the most and the least courses.
m.(1 pts) Determine which Course is the minimum of all Course objects in the catalog.
n. (1 pts) Determine which Course is the maximum of all Course objects in the catalog.
o. (1 pts) Determine which Student has the most and least credits.
13. (5 pts) Display all the Objects using toString on the console (this includes existing plus
recently added)
14. (5 pts) Write all of the Object details to a plain text output file using the same format as the
input file
SUBMISSION INSTRUCTIONS:
4. Submit your source code to zybook for grading using the test cases that have been
provided for the project. (65 points)
5. Record a 5-10 minute video of the project running through the steps to demonstrate the
functionality as you explain it. (35 points) Explain the code in depth and cover all points from
the rubric in order.
6. Upload your video to youtube and provide the link as a comment in your code at the top
of the Driver_SchoolDB java file. (The visibility of your video must NOT be private. It CAN be
unlisted)
NOTE: Video explanation and code must both be submitted by the deadline to earn credit, even if the
program is not fully functional.