This Java code involves implementing a simple university personnel management program. The program contains three kinds of objects: Staff, Student, and Faculty. For each object, the program stores relevant information such as university ID, name, etc. Different information is stored depending on the type of object. For example, a student has a gpa, a faculty has a title and department (professor, mathematics). For each of any class data member, your program must include the getters and the setters, and each class must include at least two constructors. The main goal of this code is to demonstrate the use of inheritance, abstract classes, abstract methods, and method overriding.   The Student class has the private attributes: - full name : String - id: String - gpa: double - Number of credit hours currently taken: int   For a faculty, we need a: - full name: String - id: String - department (mathematics, engineering or english): String - Rank (professor or adjunct): String   For a staff, we need a: - full name: String - id: String - department (mathematics, engineering or english): String - status (part time or full time): String   Students in this college pay $236.45 per credit hour in addition to a $52 administrative fee. Your code should generate a tuition invoice ( a method within the class Student). Note that students get 25% off total payment if their gpa is greater or equal to 3.85.   The code should have the following hierarchy: Person------>Employee & Student Employee-------->Faculty & Staff   Both classes Student and Employee inherit from the abstract class Person. The abstract class Person has what is common to a Student and an Employee (Faculty or Staff). The class Person must include the signature: public abstract void print();   The abstract method print is overridden to print the fee invoice for a student and to print the information for a faculty or a staff member. It is left to you (the programmer) to come up with other abstract methods if you see fit(this is optional).   The class Employee should also be abstract, and it is supposed to include what is common to a staff and a faculty. Test your code with ONE array of size 100 of type Person. You may choose to use any data structure of your choosing such as an ArrayList, Linked List,...etc. The bottom line is that all objects of type Student, Faculty and Staff are stored within the same data structure.   When asked to enter the faculty’s department, matheMatics and MathematiCs are considered to be the same, and your program should display Mathematics if faculty information is to be displayed to the screen. However, if the user enters Mathematics department, then this is an invalid entry. Consider these departments only: Mathematics, Engineering and English. As for the rank of a faculty, consider these ranks only: Professor and Adjunct.   The code should handle all exceptions.   Note that any person’s id must be of the form LetterLetterDigitDigitDigitDigit like ek7894.  We require that ids are checked for duplication. That is: No two persons can have the same id!   When option 8 is chosen to exit the program, the user is presented with the option to create a report that has the most up-to-date data from the array (or ArrayList list...) saved into a text file (report.txt). A sample report is provided at the end of this document.   The final report should print the students sorted by descending gpas or descending names. For how to sort the students (by gpa or name), you may implement one of the Java’s interfaces Comparable or Comparator.

Database Systems: Design, Implementation, & Management
11th Edition
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Chapter3: The Relational Database Model
Section: Chapter Questions
Problem 14RQ
icon
Related questions
Question
This Java code involves implementing a simple university personnel management program. The program contains three kinds of objects: Staff, Student, and Faculty. For each object, the program stores relevant information such as university ID, name, etc. Different information is stored depending on the type of object. For example, a student has a gpa, a faculty has a title and department (professor, mathematics). For each of any class data member, your program must include the getters and the setters, and each class must include at least two constructors. The main goal of this code is to demonstrate the use of inheritance, abstract classes, abstract methods, and method overriding.
 
The Student class has the private attributes:
- full name : String
- id: String
- gpa: double
- Number of credit hours currently taken: int
 
For a faculty, we need a:
- full name: String
- id: String
- department (mathematics, engineering or english): String
- Rank (professor or adjunct): String
 
For a staff, we need a:
- full name: String
- id: String
- department (mathematics, engineering or english): String
- status (part time or full time): String
 
Students in this college pay $236.45 per credit hour in addition to a $52 administrative fee. Your code should generate a tuition invoice ( a method within the class Student). Note that students get 25% off total payment if their gpa is greater or equal to 3.85.
 
The code should have the following hierarchy:
Person------>Employee & Student
Employee-------->Faculty & Staff
 
Both classes Student and Employee inherit from the abstract class Person. The abstract class Person has what is common to a Student and an Employee (Faculty or Staff). The class Person must include the signature: public abstract void print();
 
The abstract method print is overridden to print the fee invoice for a student and to print the information for a faculty or a staff member. It is left to you (the programmer) to come up with other abstract methods if you see fit(this is optional).
 
The class Employee should also be abstract, and it is supposed to include what is common to a staff and a faculty.
Test your code with ONE array of size 100 of type Person. You may choose to use any data structure of your choosing such as an ArrayList, Linked List,...etc. The bottom line is that all objects of type Student, Faculty and Staff are stored within the same data structure.
 
When asked to enter the faculty’s department, matheMatics and MathematiCs are considered to be the same, and your program should display Mathematics if faculty information is to be displayed to the screen. However, if the user enters Mathematics department, then this is an invalid entry. Consider these departments only: Mathematics, Engineering and English. As for the rank of a faculty, consider these ranks only: Professor and Adjunct.
 
The code should handle all exceptions.
 
Note that any person’s id must be of the form LetterLetterDigitDigitDigitDigit like ek7894.  We require that ids are checked for duplication. That is: No two persons can have the same id!
 
When option 8 is chosen to exit the program, the user is presented with the option to create a report that has the most up-to-date data from the array (or ArrayList list...) saved into a text file (report.txt). A sample report is provided at the end of this document.
 
The final report should print the students sorted by descending gpas or descending names. For how to sort the students (by gpa or name), you may implement one of the Java’s interfaces Comparable or Comparator. 
 
 
 
Sample Report (report.txt)
Report created on 07/08/2023
水水水水水
Faculty Members
1. John Miller
ID: jo7894
Professor, Engineering
Staff Members
1. Jamal Kareem
ID: ja6980
English, Full Time
Students (Sorted by gpa in descending order)
1. Julia Alvarez
ID: ju1254
Gpa: 3.26
Credit hours: 7
2. Matt Jones
ID: ma0258
Gpa: 2.78
Credit hours: 0
(Your code should print the date of the day we run it)
Transcribed Image Text:Sample Report (report.txt) Report created on 07/08/2023 水水水水水 Faculty Members 1. John Miller ID: jo7894 Professor, Engineering Staff Members 1. Jamal Kareem ID: ja6980 English, Full Time Students (Sorted by gpa in descending order) 1. Julia Alvarez ID: ju1254 Gpa: 3.26 Credit hours: 7 2. Matt Jones ID: ma0258 Gpa: 2.78 Credit hours: 0 (Your code should print the date of the day we run it)
1. Enter the information of a faculty
2. Enter the information of a students
3. Print tuition invoice
4. Print faculty information
5. Enter the information of a staff member
6. Print the information of a staff member
7. Delete a person
8. Exit Program
Enter your selection: 1
Enter the faculty info:
Name of the faculty:
ID: jo7894
Rank: Instructor
John Miller
"Instructor" is invalid.
Rank: Assistant Professor
"Assistant Professor" is invalid.
Rank: Professor
Department: Engineering
Transcribed Image Text:1. Enter the information of a faculty 2. Enter the information of a students 3. Print tuition invoice 4. Print faculty information 5. Enter the information of a staff member 6. Print the information of a staff member 7. Delete a person 8. Exit Program Enter your selection: 1 Enter the faculty info: Name of the faculty: ID: jo7894 Rank: Instructor John Miller "Instructor" is invalid. Rank: Assistant Professor "Assistant Professor" is invalid. Rank: Professor Department: Engineering
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning