Share
Explore BrainMass

UML into Java Code

Please help with this UML Diagram by updating it and putting it into Java Code. The one that I did is listed below:

Car object class:

1. What does CAR object know?

The CAR object should know about

a. Its direction to move

b. Its Speed limit(min and max)

c. Gear limit

d. Break capacity

e. Engine status

2. What can a CAR object do?

The functions of CAR are

a. Move (front and back)

b. Start Engine

c. Stop Engine

d. Increase Gear

e. Decrease Gear

f. Stop or slow down using Break

______________________________________________________________________________

Car Object

----------------------------------------------------------------

- __accelerationTime: float

- __acceleration: float

- __breakAcceleration: float

- __gear: int

- __gearUpshifted: Boolean

- __maxGear: int

- __position: float

- __speed: float

- __started: boolean

------------------------------------------------------------------------

+ setAccelerationSpeed(speed: Float):

+ getAccelerationSpeed() : Float

+ displaySpeed()

+ brake()

+ setDownshiftGear(gear: Int)

+ getDownshiftGear() : Int

+ startEngine(): int

+ stopEngine(): int

+ toString(): String

+ upshiftGear(): int.

Solution Preview

See attached file for the completed solution.

Question:
UML into Java Code
I need help with this UML Diagram by updating it and putting it into Java Code. The one that I did is listed below:

Car object class:

1. What does CAR object know?

The CAR object should know about

a. Its direction to move

b. Its Speed limit(min and max)

c. Gear limit

d. Break capacity

e. Engine status

2. What can a CAR object do?

The functions of CAR are

a. Move (front and back)

b. Start Engine

c. Stop Engine

d. Increase Gear

e. Decrease Gear

f. Stop or slow down using Break

______________________________________________________________________________

Car Object ...

Solution Summary

UML into Java codes are examined in the solution. What the CAR objects knows is determined.

$2.19