Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You are implementing a system that manages parking lot using object-oriented pri

ID: 3767238 • Letter: Y

Question

You are implementing a system that manages parking lot using object-oriented principles.

-­ The parking lot has multiple levels. Each level has a multiple rows of spots.

-­ Motorcycles, cars and buses can park. It has motorcycle spot, compact spot and large spot.

-­ A motorcycle can park in any spot.

-­ A car can park in either a single compact spot or a single large spot.

-­ A bus can park in five large spots that are consecutive and with in the same row. It cannot park in small spot.

A) Draw a UML class diagram. Identify classes and the relation between them (for example inheritance or aggregation) • Use a standard tool to draw UML diagram such as starUML which you can download it from http://staruml.io/download. Manual UML class diagrams are not accepted.

B) Convert the class diagram to java classes.  


Note: • NUM_OF_LEVELS = 5

• SPOTS_PER_LEVEL = 30

• SPOTS_PER_ROW = 10

• 20% of spots are large (per level) and they are consecutive with the same row.

• 20% of spots are motorcycle spots (per level) and they are consecutive with the same row.  

Explanation / Answer

You are implementing a system that manages parking lot using object-oriented principles.

-­ The parking lot has multiple levels. Each level has a multiple rows of spots.

-­ Motorcycles, cars and buses can park. It has motorcycle spot, compact spot and large spot.

-­ A motorcycle can park in any spot.

-­ A car can park in either a single compact spot or a single large spot.

-­ A bus can park in five large spots that are consecutive and with in the same row. It cannot park in small spot.

A) Draw a UML class diagram. Identify classes and the relation between them (for example inheritance or aggregation) • Use a standard tool to draw UML diagram such as starUML which you can download it from http://staruml.io/download. Manual UML class diagrams are not accepted.

B) Convert the class diagram to java classes

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote