Answered step by step
Verified Expert Solution
Link Copied!

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

  1. The car must have an engine and tires.
  2. The car must have four tires.
  3. The car must have one engine.
  4. The engine must be able to be started and stopped.
  5. Before the engine can be started all tires must have at least 32 psi.
  6. 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

  1. Code the logic and rules to properly start, run, stop, and restart the car.
  2. Code all the classes per your models.
  3. 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

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

Step: 3

blur-text-image

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

How is slaked lime powder prepared ?

Answered: 1 week ago

Question

Why does electric current flow through acid?

Answered: 1 week ago

Question

What is Taxonomy ?

Answered: 1 week ago

Question

1. In taxonomy which are the factors to be studied ?

Answered: 1 week ago