Hello,
I'm having a bit of trouble with this error. The error seems to be wih setRented but I'm not really sure what to change.
This is my interface
public interface Rentable{
double getRent();
void setRent (double rent);
boolean isRented();
void setRented (boolean rented);
}
This is my abstract class
public abstract class Vehicle{
private String make;
public Vehicle (String make){
this.make=make;
}
public String getMake(){
return make;
}
public abstract String getLicenceCat();
public String toString(){
return "Make" + make;
}
}
And this is my Concrete subclass
ublic class RentalCar extends Vehicle implements Rentable{
private String licenceCat;
private double rent;
private boolean rented;
public RentalCar (String make){
super(make);
}
public String getLicenceCat(){
return "Licence Category";
}
public void setRent (double rent){
this.rent = rent;
}
public double getRent(){
return rent;
}
public boolean isRented(){
rented = true;
return rented;
}
public void setRent (boolean rented){
this.rented = rented;
}
}
Thanks!