
Write the coding for the following OOP base concepts.
No of wheels - integer
No of passenger - integer
Keyon - Boolean
It has methods accelerate (step) , start ( ), stop ( ), break ( ), speedometer ( ) Which can be accessed anywhere but are active when keyon = true.
a. Accelerate(step) â?? This method increases the speed by a step value but step value is integer â?? 6 b. Start ()- changes the keyOn to true. c. Stop () â?? changes the keyOn to false d. Break () â?? this method reduces the speed by half speed become zero. e. Speedometer ( )- show the speed of the vehicle f. Following method are using for gets the properties of vehicle . getNoofwheels( ), get Noofpassenger( ), getEnginepower( ), getSpeed ( ), getKeyOn( ), getMaxspeed( ) â?¦..
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.