Home Answers Viewqa Development-process ΓΆβ?¬β?? Rapid Application Development

 
 


nadi tharanga
ΓΆβ?¬β?? Rapid Application Development
0 Answer(s)      a year ago
Posted in : Development process

Write the coding for the following OOP base concepts.

  1. Creates vehicle class It has properties No of wheels, no of passenger, speed, keyOn which are not directly accessed but maxspeed can only directly accessed by inheritance class.

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( ) β?¦..

View Answers









Related Pages:

Ask Questions?

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.