Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 Create a new Java class called Vehicle (remember Classes MUST start with a capital letter). 2 Next create another class called Car. The Car


1 Create a new Java class called Vehicle (remember Classes MUST start with a capital letter).

2 Next create another class called Car. The Car class should be set up to inherit from the Vehicle class.

3 Next create another class, this will be for a specific type of car (the actual model, not the manufacturer; so Focus, Mustang, Camaro, Outlander, Rogue, etc.), this class should inherit from the Car class.

4 Somewhere within these 3 classes you want to implement the following behaviors (methods): a) steering b) changing gears c) moving (keep in mind that these behaviors all involve \"speed\" as a concept)

5 You\'re going to have to decide which class it makes the most sense to put the necessary state and behaviors (fields & methods) into; i.e. which of the 3 classes does it make more sense to put a \"doors\" field in?

6 For the class that is for a specific type of car, you also want to add something unique for that type of car; does it have all-wheel drive, or off-roading capabilities, etc. There\'s no exact answer for this assignment, you just have to code it in a manner that works and fulfills the requirements.




Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Programming questions