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 <step<6, it cannot exceed maxspeed limit. 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( ) …..
-
Answer:
Post your code. = Then people can help you get it right.
Lakmal at Yahoo! Answers Visit the source
Other answers
Don't you ever think that this is too much work to be done? You expect us to write the whole code for you? While you sit back and won't learn anything and then failed the course, and than regret it? At least put effort into it before letting people do everything for you. Trials and tribulations are important and life and to be successful.
The Shadowman
Related Q & A:
- How To Learn Coding?Best solution by Yahoo! Answers
- Write the chemical formula for the following compounds?Best solution by Yahoo! Answers
- What is relationship between agile and OOP?Best solution by Stack Overflow
- How to identify the acid, base, conjugate acid, and the conjugate base?Best solution by ehow.com
- Write a balanced net ionic equation for the following reaction?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.