Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want the answer in java please. Consider the Teacher, FullTimeTeacher, Part Time Teacher. IT. University and Employee classes described in the below UML Employee

image text in transcribed
image text in transcribed
I want the answer in java please.
Consider the Teacher, FullTimeTeacher, Part Time Teacher. IT. University and Employee classes described in the below UML Employee -name:String -dobjaval Date Employeeiname String, dob Datei etters and setters override toString String statistEmployees + University de Employee word etEmployee Employee +94 mers Archime Teacher e Teachers or StringArrayList Teacher extends extends Teacher rate double major String +Teacher major String! getters and setters -computeSalaryll double CT Salary: double ITsalary: double) etters and extends extends Pull Time Teacher -baseSalary int -hourLoadint workedHours Fulltime Teacher baseSalarint, losd:int) getters and setters override computeSalary double toString: String Part Time Teacher practurint +Part Time Teacher etters and setters verde computer Salary double ering String 1. Implement the class Employee 2. Implement the class IT 3. Implement the class Teacher. Note the following: The rate is price per teaching hour its value should be strictly greater than zero b. The teacher salary is given by: salary-workedHourserate 4. Implement the class Full Time Teacher. It has the baseSalary and hourl.oad as attributes 1. The salary for a full time teacher is given by Salary-base salary + rate*extra hours. Where extra hours are the exceeded working hours to the teacher b. The toString() method retums a description like "Full Timer (major): base salary .... extra hours = load salary..." 5. Implement the class Part Time Teacher. It has on private atribute, the proctoring Hours. The salary for a part time teacher is given by Salary rate working hours +0.5 rateproctoring hours b. The toString() method returns a description like Part time (major): worked hours.... salary..." 6. Implement the University class. It has a collection of employees called staff (an ArrayList) and the following methods: a. Constructor: Creates an empty collection of teachers. b. add (E: Employee): adds an Employee object to the collection. c.getEmployee(id:int): returns the employee in the collection at the index id. d.getFullTimers(): returns an ArryList containing the Full Time Teacher from staff e. getMajorTeacher( (major:String): returns an ArrayList of all Teacher of the major passed as parameter 7. Write a driver program that: a. Creates a University b. Add to the array: 2 Part TimeTeachers, 2 FullTime Teachers, two Teachers and one IT and adds them to the university c. Print information about all full timers at the university d. Print information about all the CSCI Teachers c. Compute and print the total salaries of all teachers

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

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago