Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java Create a class Worker. Your Worker class should include the following attributes as String variables: Name, Worker ID, Worker Address, Worker City, Worker

In Java

Create a class Worker. Your Worker class should include the following attributes as String variables:

Name, Worker ID, Worker Address, Worker City, Worker State

Create the constructor that initializes the above worker attributes.

Then make another class name HourlyWorker that inherits from the Worker class. HourlyWOrker has to use the inherited parent class variables and add in hourlySalary and billableHours. Your HourlyWorker class should contain a constructor that calls the constructor from the Worker class to initialize the common instance variables but also initializes the hourlySalary and billableHours. Next create a billing method to HourlyWorker that will calculate the amount due.

FInally, create a test class that prompts the user for the information for five hourly workers (Use the scanner to input user information), creates an arraylist of 5 hourly cworker objects, display the attributes and billing for each of the five hourly workers. Display the worker name and billing amount for each worker and the total billing amount for all five .workers combined.

.

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

Successful Keyword Searching Initiating Research On Popular Topics Using Electronic Databases

Authors: Randall MacDonald, Susan MacDonald

1st Edition

0313306761, 978-0313306761

More Books

Students also viewed these Databases questions

Question

2. Do the easy questions first.

Answered: 1 week ago

Question

The Nature of Nonverbal Communication

Answered: 1 week ago

Question

Functions of Nonverbal Communication

Answered: 1 week ago

Question

Nonverbal Communication Codes

Answered: 1 week ago