Question: Use Java as the coding language For this assignment you are to download the following file: People.txt Download People.txtand create the FULL classes that will

Use Java as the coding language

For this assignment you are to download the following file: People.txt Download People.txtand create the FULL classes that will store your data.

Note:

Students have: firstName, lastName, age, gender, and yearInSchool

Professors have: firstName, lastName, age, gender, yearsTeaching, and salary

Create a generic class that stores the common fields and classes that will inherit from that class (i.e., Student and Professor).

For the previous 3 classes make sure you are doing basic data checking (e.g., age can not be less than 0)

Also, a FULL class means to include:

  1. Private properties
  2. Constructors:
    • String
    • String[]
    • Copy
    • Workhorse
  3. Methods (min)
    • clone (can't have a clone in your abstract class)
    • equals
    • toString()
  4. Getters and Setters

Create a Tester class that will open the file and import the data.

In Tester Create the following reports:

  1. Print all seniors
  2. Print all professors that make more than the average salary of all professors
  3. All impossible professors. A professor must be at least 21 years old to be teaching. Therefore, if the difference between their age and the number of years teaching is less than 21 then their data is incorrect.

First few lines of People.txt

Student Kristien Mapholm 20 Female 3 Student Ellie Cheves 22 Female 3 Student Ezri Bruyns 22 Male 4 Student Crosby Wrate 19 Male 1 Student Dyna Loraine 19 Female 1 Student Goran Marquis 18 Male 1 Student Germain Hollingsbee 22 Female 4 Student Joell Borchardt 17 Female 2 Student Gawain Pelfer 22 Male 1 Student Decca Kropp 20 Male 1 Professor Spenser Harridge 62 Male 30 153342 Professor Ban Janicijevic 46 Male 34 158482 Professor Alwin Auguste 35 Male 22 64403 Professor Richard Di Giacomettino 85 Male 21 123363

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!