Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are writing the application that deals with information about Person at College. 2 . 1 Enum classes You should create two enumeration classes Sex
You are writing the application that deals with information about Person at College.
Enum classes
You should create two enumeration classes Sex and Level.
The enumeration class Sex has only two elements: MALE and FEMALE.
The enumeration class Level has following elements: ESLA ESLB ESLA ESLB ESLA ESLB ESLA
ESLB ESLA ESLB ESLA ESLB
Interfaces and Classes
For every class, you should decide which private variables are needed. Also, dont forget about
toString method.
Write an interface Person that requires the implementation of typical features that work with
First Name, Last Name, Id and Sex of person.
Write an abstract class Student. The constructor of this class gets parameters id first name,
last name, sex, and month, day, year of birth. In this class, you should realize all methods of the
interface. Also, this class includes one abstract method getPrice and methods that set and
return credits of a student. A ESL student has every time credits.
Write the ESL class that is a subclass of a Student. The getPrice method returns $ every
time. The constructor of this class gets parameters: id first name, last name, day, month,
year, sex, level.
Write the ESLStudents class. This class must contain ArrayList of ESL students and have
methods which let to add a student, remove a student with a specific index, return numbers
of students, return ESL student that has a specific index. Also, this class must have a method
that called isFound This method gets the id of a student and returns the index of this
student or if this id doesn't exist. Besides, you should realize a method that gets a level and
returns how many students have this level.
Write the College class that is a subclass of a Student. The getPrice method returns a value
equals the cost of the one credit multiply by the number of credits.
Write the CollegeStudents class. This class must contain ArrayList of College students and
have methods which let to add a student, remove a student with a specific index, return
numbers of students, return a College student that has a specific index. Also, this class must
have a method that called isFound This method gets the id of a student and returns the
index of this student or if this id doesn't exist. Besides, you should realize a method that
returns how many fulltime students there are. A fulltime student must have or more
credits.
toString method
At the topmost class, create a toString method that supplies all the information it knows about the
students. In each subclass that adds information of interest, concatenate that information to the
string created by its superclass.
General
We dont need a variety of constructors here; create constructors that include everything needed.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started