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 are reading a preview
Upload your documents to download or

Become a Desklib member to get access