public class Employee {.

Added on - 16 Oct 2019

  • 2

    Pages

  • 292

    Words

  • 139

    Views

  • 0

    Downloads

Trusted by +2 million users,
1000+ happy students everyday
Showing pages 1 to 1 of 2 pages
public class Employee {//To-Do: Declare three instance variables://1) employee’s name (string),//2) attendanceRate (double),//3) hoursWorked (integer).//To-Do: Declare a static variable for tracking the number of employee objects created// -----------------------------------------------------------------// A constructor// -----------------------------------------------------------------public Employee(String newName, double newAR, int newHours) {//To-Do: use newName, newAR, newHours to initialize instance data//To-Do: increase the value of the static variable for tracking the number of employee objectscreated}//To-Do: Include get and set methods for the three instance variables.//For example, this is a set method for an employee’s name//public void setName(String input_name){//name = input_name;//}//And, this is an example get method for employee's name//public String getName(){//return name;//}//This is an instance method called isEligibleForBonus() that returns a boolean.
desklib-logo
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document