Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



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

Have Programming Question? Ask it here!
 
 
 


nadi tharanga
ΓΆβ?¬β?? Rapid Application Development
0 Answer(s)      2 years and 3 months 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( ) β?¦..


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com