Answered step by step
Verified Expert Solution
Link Copied!

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

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

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

explain what is meant by the term fair dismissal

Answered: 1 week ago

Question

Find dy/dx if x = te, y = 2t2 +1

Answered: 1 week ago

Question

5. How do instructional objectives help learning to occur?

Answered: 1 week ago