L8.3: Getters & Setters - ModelX class
Fri Jun 02 2023 11:37:45 GMT+0000 (Coordinated Universal Time)
Saved by
@TestProSupport
public class ModelX extends Car {
boolean autoPilot = false;
public void switchAutopilotOn() {
autoPilot = true;
System.out.println("Autopilot is switched on");
}
public void switchAutopilotOff() {
autoPilot = false;
System.out.println("Autopilot is switched off");
}
public String returnCarModel() {
return "Car model is ModelX";
}
}
content_copyCOPY
Comments