Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help to design a race car that can be used in a JAVA console game. The car must be able to be started,
I need help to design a race car that can be used in a JAVA console game. The car must be able to be started, run, and stopped.
Requirements
- The car must have an engine and tires.
- The car must have four tires.
- The car must have one engine.
- The engine must be able to be started and stopped.
- Before the engine can be started all tires must have at least 32 psi.
- The car must be able to start, run between 1 and 60 mph, stop, and restart.
Modeling
- You must do object-orientated analysis from the requirements.
- What objects will you need (hint, pick the nouns out of the requirements)?
- Make sure each object has the proper design:
- States (nouns from requirements)
- Behaviors (verbs from requirements)
- Relationships:
- If Object A has a relationship to (or contains) Object B, then it must be included as a member variable in Object A.
Implementation
- Code the logic and rules to properly start, run, stop, and restart the car.
- Code all the classes per your models.
- You must be able to exercise your car from another "driver" script.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started