Question: Java coding..... Create an abstract class Teacher. Your Teacher class should include the following attributes: First name (string) Last name (string) Teacher id (string) Teacher

Java coding.....

Create an abstract class Teacher. Your Teacher class should include the following attributes: First name (string) Last name (string) Teacher id (string) Teacher home street address (string) Teacher home city (string) Teacher home state (string) Write a constructor to initialize the above Teacher attributes. Create an abstract method called earnings. Create another class TempTeacher that inherits from the abstract Teacher class. TempTeacher must use the inherited parent class variables and add in attributes TempRate and HoursWorked. Your TempTeacher class should contain a constructor that calls the constructor from the Teacher class to initialize the common instance variables but also initializes the TempRate and HoursWorked. Implement the Teacher abstract earnings method in TempTeacher to calculate the earnings for a week. Note that earnings is Temp rate * hours worked. Create a test class that prompts the user for the information for two TempTeachers, creates the 2 two Temp Teachers objects, calls the earnings method then displays the attributes and earnings for each of the two Temp.

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!