Answered step by step
Verified Expert Solution
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! HourlyWorker class: Accountant class: EmployeeDriver class: Employee class:
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 declaredStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started