Answered step by step
Verified Expert Solution
Link Copied!

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.
1 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 non-redundant students.
UniqueInstructorList class: This class is used to store a list of non-redundant 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.
1.1 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 5. 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.
111
,1.3 UniqueStudentList class
In the third file UniqueStudentLiat . jawa, you may inclode the folbowing instabee variabks and methods:
Private instance varlable atudentMrrayL1at (type: RrrayL1st c-3tudent so).
A defioult coustroctor to initialize atudenthryayL1st:
3
Class Uniquestudentust
jwi ling cepect
Ungueltionorint
ratends ; wro.1nog;.06jeet
Conatucter Summary
Servintis
Cosatractor mas Descripbos
Method Summary
\table[[An Nrifods,,],[Mobinar and tries,Bothod mat Dewcription],[mbLA,saytubet inteblev o)],[boolens,avetainastabseriftuonat as],[2ves.w111.2rengloteltosteny,owtwhekirreploto],[metd,primatwokerltet {1]]
Flgure 3: Summary of the Unilqw:StudentList Class.
One getter motbod to return the instance varlable (arorsooe).
A method addStudent that add a student into atudeat.krrayL1at. 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 RrrayL1at 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, 06;est
Conatructor Sammary
CeAstraties
Cosatrackor and Cescripos
Method Summary
Figure 4: 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.1.5 PersonTester class
In the fifth fil: PeraomTeater. java, you will nevd to do the followings
You bord to wad data file "data1.txt" 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 boe-duplicatod stodents:
(b) Detaked student List through calling the method of printBtudentL-1at.
be nicely labeled and
Repart the abowe steps to read data file "data2.txt" into OaiqueInatructorLiat
abjoct.
Your final peogram output should bok Libe Figure 5.
Figure 5: A screnshot of the progrim output.
2 Submission
Uplawd the folkowing items on D2L 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 5).
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions