Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago