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.
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.
Chapter4: Analyzing And Charting Financial Data
Section: Chapter Questions
Problem 2.12CP
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
- 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
- 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
- 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.
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.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
Knowledge Booster
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.Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
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