Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello can you please help me with my project it is similar to this but not the exact same. 1 Description of the Program In
Hello can you please help me with my project it is similar to this but not the exact same.
Description of the Program
In this assignment, you will write five classes:
Student class: This class inherits from a superclass Person given to you
Instrucor class: This class inherits from a superclass Person.
UniqueStudentList class: This class is used to store a list of nonredundant students.
UniqueInstructorList class: This class is used to store a list of nonredundant in
structors.
PersonTester class: This class handles reading dataset into UniqueStudentList and
UniqueInstructorList objects, and printing them out in a sorted order.
The implementation details are described as follows.
Student class
In the first file Student. java, you should include the following additional instance variables
and methods other than all instance variables and methods inherited from class Person:
Private instance variables studentID, and major;
A constructor takes four inputs name age, studentID and major;
Two additional getter methods to return each of instance variables accessor;
Two setter methods to change each of instance variables mutator;
A method toString that converts a student's information into string form. The
string should have the format as shown in Figure You should override superclass
toString method.
A method compareTo that implements the interface Comparable, so that Student
objects can be sorted by studentID in an ascending order.
A method equals that compares this student's information with another object's in
formation. Return true if they are same, false if they are not.
The summary of the Student class is given below.
UniqueStudentList class
In the third file UniqueStudentLiat jawa, you may inclode the folbowing instabee variabks and methods:
Private instance varlable atudentMrrayLat type: RrrayLst ctudent so
A defioult coustroctor to initialize atudenthryayLst:
Class Uniquestudentust
jwi ling cepect
Ungueltionorint
ratends ; wronog;jeet
Conatucter Summary
Servintis
Cosatractor mas Descripbos
Method Summary
tableAn Nrifods,,Mobinar and tries,Bothod mat DewcriptionmbLAsaytubet inteblev oboolensavetainastabseriftuonat asves.wrengloteltosteny,owtwhekirreplotometdprimatwokerltet
Flgure : Summary of the Unilqw:StudentList Class.
One getter motbod to return the instance varlable arorsooe
A method addStudent that add a student into atudeat.krrayLat Male: sure you only add it if atudeat RrrayLiat does bot coestain this bew student objoct. Otherwise, you will not add it to the list.
A motbod containaStudent that is uewd to chock whether the inpuat studemt is in atudemt RrrayLat or bot. This method may be calbed within the adAStudest mothod.
Note: You really don't hawe to implement thas moctbod if wou doe't want. You can do the dhecking process within the addStudent method. It mabes your implementation ckoner if adding thas moctbod. Class UniquelnstructorUst
jen ling ceptar
Unvarinatractortint
ra:ridn ;res, Ineg, ;est
Conatructor Sammary
CeAstraties
Cosatrackor and Cescripos
Method Summary
Figure : Summary of the DeiquelestructorLast Class.
A defealt coustroctor to initialize inatroctorArrayliat :
One getter motbod to return the irsitanoe varlable arcosace
A method addInatructor that wd an instructor into inatructorhrrayLiat. Malar:
sure you conly add it if inatructordrrayLiat doss not contain this new Instructor
objoct. Otherwise, you will bot add it to the list.
A method containaTzatructor that so used to check whether the inpue irstructor is in
inatructorArraylist of not. Thas motbod may be called within the addInatructor
method.
Note: You really don't have to implement thas moctbod if wou doe't want. You can do
the dhecking prosess within the addInatroctor method. It males your implementation
ckoner if adding this moctbod PersonTester class
In the fifth fil: PeraomTeater. java, you will nevd to do the followings
You bord to wad data file "datatxt into the UniqueStudentLiat object. Specif
ically, for each line you read, you novil to croute a Student object, and then add the
studest into the studernt last.
Do sorting on the student array list, wnd then print out a sorted student list sorted
by atudest ID Tlse outpurts should sbould include the followings:
a Stodent lst infocmation: including number of boeduplicatod stodents:
b Detaked student List through calling the method of printBtudentLat
be nicely labeled and
Repart the abowe steps to read data file "datatxt into OaiqueInatructorLiat
abjoct.
Your final peogram output should bok Libe Figure
Figure : A screnshot of the progrim output.
Submission
Uplawd the folkowing items on DL dropbax, including:
A zippod file coutaining the souree code of all java files
Serensbot of your program output Simalar to sample output shown in Figure
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