The problem is, no idea for bosses to help
CodePudding user response:
The class Car {
Private:
Bool feel;//=true, false=OFF
Bool light;
Int. Rate;
Public:
The Car () {=feel light=false; Rate=0; };
Void openDoor () {feel=true; };
Void closeDoor () {feel=false; };
Bool isDoorOpen () {return feel; };
Void turnOnLight () {light=true; };
Void turnOffLight () {light=false; }
Bool isLightOn () {return light; };
Void acce () {rate +=10; };
Void dece () {rate -=10; If (rate<0) rate=0; };
Int. J getRate () {return rate; };
}
Int main () {
The Car the Car;
.
return 0;
}
CodePudding user response:
Fun