Answered step by step
Verified Expert Solution
Question
1 Approved Answer
comouter java oop Q2) Assume that you have the below UML diagram, where the Employee class is an abstract class.mark) Write a program to do
comouter
java oop
Q2) Assume that you have the below UML diagram, where the Employee class is an abstract class.mark) Write a program to do the following: A. For the Employee Class: 1. A parametrized constructor to initialize name and payment Per Hour 2.abstract method calculate Salary(): - setters and getters for name and paymentPer Hour (I mark) -for the Contractor Class: 1. A parametrized constructor to initialize name and paymentPerHour, and working Hours. Override the method calculate Salary to compute the Salary (2 mark) For the Full TimeEmployee Class A parametrized constructor to initialize name and paymentPerHour (note the working hours for fulltime employee is 8). Override the method calculateSalary to compute the Salary.(2 marks) Perform the following in the Main class: (1 mark) Define an object named Objl of type Employee record your notes) Define an object named Obj2 of type contractor, and set the values of its data members and Print the salary of Obj2. Define an object named Obj3 of type Full TimeEmployee, and set the values of its data members and Print the salary of obj3 Step 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