Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

oop java Show reservindow Fastion Zoom Window (2) Assume that you have the below UML diagram, where the Employee class is an abstract class. Employee

image text in transcribed

image text in transcribed

image text in transcribed

oop java

Show reservindow Fastion Zoom Window (2) Assume that you have the below UML diagram, where the Employee class is an abstract class. Employee (abstract) - name: String - paymentPerHour: int + calculate Salary(abstract); int Extends Extends Contractor FullTimeEmployee + working Hours: int + working Hours: int calculate Salary: int + calculate Salary: int Write a program to do the following: A- For the Employee Class: 1- A parametrized constructor to initialize name and paymentPer Hour, 2- abstract method calculate Salary(); 3- setters and getters for name and paymentPer Hour (1 mark) B- for the Contractor Class: 1- A parametrized constructor to initialize name and paymentPerHour, and working Hours. 2- Override the method calculate Salary() to compute the Salary (2 mark) C- For the FullTimeEmployee Class 1- A parametrized constructor to initialize name and paymentPerHour (note the working hours for fulltime employee is 8). 2- Override the method calculate Salary() to compute the Salary.(2 marks) D- Perform the following in the Main class: (1 mark) a. Define an object named Objl of type Employee( record your notes) b. Define an object named Obj2 of type contractor, and set the values of its data members and Print the salary of Obj2. c. Define an object named Obj3 of type FullTimeEmployee, 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

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

Students also viewed these Databases questions

Question

Is this correct? If not, why? Ilv DC =

Answered: 1 week ago

Question

Discuss the goals of financial management.

Answered: 1 week ago

Question

5. Prepare for the role of interviewee

Answered: 1 week ago

Question

6. Secure job interviews and manage them with confidence

Answered: 1 week ago