Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Job interface, that includes some of the important parts of a Job: public boolean hired() public boolean fired() public double getPay() public boolean
Write a Job interface, that includes some of the important parts of a Job:
- public boolean hired()
- public boolean fired()
- public double getPay()
- public boolean raise(double value)
- public void setWorkHours(int startHour, int startMinute, int endHour, int endMinute)
- public boolean goToMeetings()
- public void readEmail()
- public boolean annoyingBoss()
Part 2
Write the RetailWorker that implements the interface like so:
- public boolean hired()
- should change the employed instance variable to be true
- public boolean fired()
- should change the employed instance variable to be false, or print a warning message if they are already fired.
- public double getPay()
- returns the pay of the RetailWorker
- public boolean raise(double value)
- Raise the pay instance variable by the amount stated
- public void setWorkHours(int startHour, int startMinute, int endHour, int endMinute)
- sets the start/end hours and minutes to the input times
- public boolean goToMeetings()
- return true if inMeeting instance variable is false
- returns false if already in a meeting
- public void readEmail()
- just prints Email read!" to console
- public boolean annoyingBoss()
- always returns true!
Part 3
After writing retail worker, write another class, of your choice, that implements the interface as well.
Previous
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