Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

More Books

Students also viewed these Databases questions

Question

2. What type of team would you recommend?

Answered: 1 week ago

Question

What was the role of the team leader? How was he or she selected?

Answered: 1 week ago

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago