Question: Develop a set of classes for a university to use in various student service and personnel applications. The classes should meet the following requirements: 1
Develop a set of classes for a university to use in various student service and personnel applications. The classes should meet the following requirements:
Person: points
A Create an abstract class Person which contains the following attributes:
firstName String
lastName String
BThe class includes:
A nonabstract method setCommonData to set the firstName and lastName by asking the user.
A nonabstract method displayInfo to display firstName and lastName.
An abstract method setData
ContactInfo: points
A Create an interface ContactInfo that contains:
A method setContactInfo to accept streetAddress, city, state, zipCode, and phoneNumber.
A method displayContactInfo to display the contact information.
UniversityEmployee: points
A Create a class UniversityEmployee based on Person and ContactInfo.
The class includes additional fields:
aid: automatically generated based on the year the UniversityEmployee was hired digits and the hire sequence number digits For example, the th employee hired in should have the ID You are not allowed to use String.format method.
b streetAddress String
c city String
d state String
e zipCode String
f phoneNumber String
g socialSecurityNumber String
h annualSalary double
i department String
UniversityEmployee includes static variable hireCount to keep track of the number of UniversityEmployee instances created.
Methods:
asetContactInfo: Method to ask the user and set the contact information street address, city, state, zip code, and phone number
b displayContactInfo : Method to display all contact information for the employee.
c setData: Method to set all data for the employee by asking the user.
d displayInfo: to display all the additional details includes the contact informations.
Faculty: points
A Create a class Faculty based on UniversityEmployee. Include an additional field:
isTenured boolean include static variable facultyhireCount to keep track of the number of Faculty instances created to generate the id automatically based on the year Faculty was hired digits and the hire sequence number digitsYou are not allowed to use String.format method.
Methods:
a Specialize setData to accept isTenured.
b Specialize displayInfo to include the tenure status in the output.
Student: points
Create a class Student based on Person and ContactInfo, include additional fields:
a streetAddress String
b city String
c state String
d zipCode String
e phoneNumber String
f emergency contact name String
g emergency contact phone String
h major String
i GPA double
To add an id field that is generated automatically for the Student class, we can follow a similar approach as we did for the UniversityEmployee and Faculty classes. The id will be generated based on the year the Student was enrolled and the sequence of their enrollment for that year. You are not allowed to use String.format method
Methods:
a Provide implementations for setContactInfofor student contact info and emergency contact by asking the user and displayContactInfo
b Specialize setData to gather all relevant details by asking the user.
c Specialize displayInfo to present all of the student's information.
UniversityList Application: points:
Write an application named UniversityList that:
a Using polymorphic reference variable of Person type, creates an array of UniversityEmployees, Faculty members, and Students.
b Prompts the user to specify which type of person's data will be entered:
U for UniversityEmployee,
F for Faculty
S for Student
or allow the user to quit Q
c Accepts data entry for the specified type of person using the appropriate class methods.
d Ensures the maximum number of each type is not exceeded. If exceeded, display an error message.
e When the user quits, displays a categorized report by using the instance of builtin operator: EX: if personsi instanceof Faculty
"University Employee" heading, listing all UniversityEmployee entered.
"Faculty" heading, listing all Faculty members entered.
"Students" heading, listing all Students entered.
If no data for a specific type is entered, display an appropriate message under that category.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
