Click here to Skip to main content
15,879,348 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have the problem statement to make an Object Model for.

Problem Statement: Every vehicle has an engine and a gearbox. A gearbox is composed of pulleys working according to predefined gear ratios. Cars have smaller engines with 4-6 gears while Sports Utility Vehicles (SUVs) have bigger engines with 4-8 gears. Heavy Duty Vehicles (HDVs) on the other hand, are designed to transport cargo thus have huge engines with 8-16 gears. The larger the numbers of gears the larger will the number of pulleys and vice versa.

Well, I have done all the Object Model, but there are three things that are confusing me:

A) The part where it says "A gearbox is composed of pulleys working according to predefined gear ratios", do we need to

~~~Case 1: Take gear and pulleys as an object and make the relation of composition from object gearbox to gear and pulleys

~~~Case 2: Take gear and pulleys as an attributes to the object gearbox

~~~If it's the Case 1 or Case 2, how are we gonna show the predefined ratio of gears for every vehicle?

B) The part where it says "Cars have smaller engines with 4-6 gears.....Sports Utility Vehicles (SUVs) have bigger engines with 4-8 gears.....Heavy Duty Vehicles (HDVs) have huge engines with 8-16 gears". So, how do we show the number of gears to all three types of vehicles? If according to Confusion (A) we chose the Case 1 and have made object gear, would we need to connect it to all the three objects Cars, SUVs and HDVs making Association among them OR if we chose the Case 2 from Confusion (A) then would we need to show the no of gears as an attributes in all the three objects Cars, SUVs and HDVs?

C) The part where it says "The larger the numbers of gears the larger will the number of pulleys and vice versa", how should we show this relation in Object Model?

Kindly, anyone help me in this. I have been using my mind since all day and did not be able to finalize any ideas. Thanks in advanced.

What I have tried:

I have explained above that what ideas I came up with, but I am just confused that what idea should I use that would be efficient.
Posted
Updated 23-Apr-17 20:36pm
Comments
Richard MacCutchan 24-Apr-17 7:26am    
Type "UML tutorial" into Google.

1 solution

My first advice is that you read and watch some tutorials about UML to understand that stuff. Your will have to talk or write about your solution The second is, that you use some pencil and paper and draw these relations.

Hints:

- a car has one gear box
- a gearbox consists of some gears (Array of a gear) and pulleys

I will today try to work with Argo UML.
 
Share this answer
 
Comments
Khubaib Khawar 24-Apr-17 3:55am    
Where can I find good UML tutorials?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900