Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 5-Word ding1 Heading2 Tdleb ubtle Em EmphasisnteeEStron Quote Intese Q Sultle Re Stytes Given the Employee class and the Lawyer class above a. Write

image text in transcribed

image text in transcribed

Lab 5-Word ding1 Heading2 Tdleb ubtle Em EmphasisnteeEStron Quote Intese Q Sultle Re Stytes Given the Employee class and the Lawyer class above a. Write an employee class SoftwareEngineer to accompany the other employees. SoftwareEngineers work 10 more hours(50 hours/week) they make $55,000 ($15,000 more than others), they get half as much vacation only 5 days), and they have an additional method named uriteCode that prints "Coding!" Use the super keyword to interact with the Employee superclass as appropriate. b. Write an employee class HarvardLawyer to accompany the other employees, Harvard lawyers are like normal lawyers, but they make 20% more money than a normal lawyer, they get 3 days more vacation, and they have to fill out three of the lawyer's forms to go on vacation. That is, the getVacationForm method should return "pinkpinkpink". (If the normal Lawyer's vacation form ever changed, the HarvardLauver' should as well. For example, if Lawyer's vacation form changed to "red", the HarvardLawyer's should return "redredred") Use the super keyword to interact with the Lawyer superclass as appropriate Write a client class called Employee Client that creates objects of Lawyer, SoftwareEngineer and HardvardLauyer class in the main method. Write a method called printEmplovee) that takes an object of Employee as a parameter and prints out salary, hour, vacation days and vacation form for the employee. Also call code() method if you are printing a SoftwareEngineer object. Call printEmplovee method from main method c. Example output for Lawyer object Lawyer Salary: $40000 Hours: 40 Vacation days: 15 Vacation form: pink

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

2. What is the business value of security and control?

Answered: 1 week ago

Question

=+Understand the fi eld of comparative IHRM.

Answered: 1 week ago