hi danpost: I am doing another one of my practice program and I am an error as usual. There is: incompatible types: boolean cannot be converted to double, i have been for the life of me trying to find where is the boolean part of it but i cannot see it.
can u tell me where it is and how to fix it. here is the codes.
public class HourlyEmployee extends Employee { String firstname; double hourlywage; float rate; double comPay; double hourlyWage; double hoursWorked; double totalpay=0; double wage; double hours; public HourlyEmployee(String firstname, double hourlywage) { super(firstname, hourlywage); setWage(hourlyWage); setHours(hoursWorked); } public double comPay(){ return 0; } public String getfirstname(){ return firstname; } public double gethourlywage(){ return hourlywage; } public void setfirstname(String firstname){ this.firstname = firstname; } public void sethourlywage(double hourlywage){ this.hourlywage = hourlywage; } public double getWage(){ return wage; } public void setWage(double hourlyWage) { // wage = } public double getHours() { return hours; } public void setHours(double hoursWorked){ totalpay = (hoursWorked >= 40) && (hoursWorked <= 1.5); there is where the error is: (incompatible types: boolean cannot be converted to double) that is the error } public double earnings(){ if(getHours()<=40) return getWage()* getHours(); return 40 * getWage() +(getHours() - 40 * getWage() * 1.5); } @Override public String toString(){ return "Employees details"+ " "+ "First name is "+ firstname+""+"Hourlywage is "+hourlywage; }