Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1: Due by the end of the class Create an interface called Employable. It has the following methods: public String getDressCode() public boolean isPaidSalary()

Part 1: Due by the end of the class

Create an interface called Employable.

It has the following methods:

public String getDressCode()

public boolean isPaidSalary()

public boolean postSecondaryEducationRequired()

public String getWorkVerb()

default public boolean getsPaid(){

return true;

}

Create an abstract class Employee which defines one abstract method:

public double getOverTimePayRate(). It also has a String name instance variable. It

also implements Employable.

Create the following classes which descend from class Employee; their respective

return values for the Employable-interface methods are listed here.

HockeyPlayer ("gretzky", "jersey", true, false, "play"); OVERTIME_PAY_RATE: 0.0

Professor ("einstein", "fancy", true, true, "teach"); OVERTIME_PAY_RATE: 2.0

Parent("mother", "anything", false, false, "care"); OVERTIME_PAY_RATE: -2.0

GasStationAttendant("smith", "uniform", false, false, "pump"); OVERTIME_PAY_RATE: 1.5

Define the following instance variables for these classes:

HockeyPlayer: int numberOfGoals

Professor: String teachingMajor

Parent: int numberOfHoursSpentPerWeekWithKids

GasStationAttendant: double numberOfDollarsStolenPerDay

Create a class called Employees which has an ArrayList of 20 Employee references.

The constructor adds five of each type of Employee above, in this order:

HockeyPlayer Wayne Gretzky scored 894 goals

HockeyPlayer Who Ever scored 0 goals

HockeyPlayer Brent Gretzky scored 1 goal

HockeyPlayer Pavel Bure scored 437 goals

HockeyPlayer Jason Harrison scored 0 goals

Professor Albert Einstein teaches Physics

Professor Jason Harrison teaches Computer Systems

Professor Richard Feynman teaches Physics

Professor BCIT Instructor teaches Computer Systems

Professor Kurt Godel teaches Logic

Parent Tiger Woods spends 1 hour/week with kids

Parent Super Mom spends 168 hours/week with kids

Parent Lazy Larry spends 20 hours/week with kids

Parent Ex Hausted spends 168 hours/week with kids

Parent Super Dad spends 167 hours/week with kids

Parent must also @Override getsPaid() to return false.

GasStationAttendant Joe Smith steals 10 dollars a day

GasStationAttendant Tony Baloney steals 100 dollars a day

GasStationAttendant Benjamin Franklin steals 100 dollars a day

GasStationAttendant Mary Fairy steals 101 dollars a day

GasStationAttendant Bee See steals 1 dollar a day

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions