Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me code the following in: JAVA Please use many COMMENTS and read the task THOROUGHLY Full points will be awarded, thanks in advance!

Please help me code the following in: JAVA

Please use many COMMENTS and read the task THOROUGHLY

Full points will be awarded, thanks in advance! image text in transcribed HourlyWorker class: image text in transcribed Accountant class: image text in transcribed EmployeeDriver class: image text in transcribed Employee class: image text in transcribed

Consultant Class Extends HourlyWorker In this section, we'l produce a class (based on existing classes) for use in modeling a part-time position as a specific kind of HourlyWorker. Your Consultant "is a" HourlyWorker, which "is an" Employee. (8) Next, create a class called Consultant, and this should inherit from HourlyWorker 9) Create constructors for Consultant just like you did in PermanentHire, and as you can see in (10) Override the calculateWeeklyPay() method so that it calculates the hours worked (20 for part- a. public class Consultant extends HourlyWorker Accountant. time) by the hourly pay ($3.00/hr) to produce a result. (11) Using the EmployeeDriver, build a few Consultants with different instance data and add them to the ArrayList of Employees. a. Be sure to see your new Consultants in the console output. (12) Using the EmployeeDriver, build a ColorException and try to add it to the ArrayList of Employees. What error do you encounter? What if you wanted the ArrayList to store both Employees and ColorException - how would this change the way ArrayList is declared

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

Question Can any type of stock or securities be used in an ESOP?

Answered: 1 week ago

Question

Question Can a self-employed person adopt a money purchase plan?

Answered: 1 week ago