Thread: Creation of Object Model using UML Convention

  1. #1
    Registered User
    Join Date
    Apr 2017
    Posts
    1

    Creation of Object Model using UML Convention

    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.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,663
    What use-cases do you envision where the 'customer' actor cares about how many pulleys are in a gearbox?

    What about the 'salesman' actor ?

    What about the 'mechanic' actor?

    I think you need to consider a wider picture to help you understand whether pulleys are objects or attributes.


    > how are we gonna show the predefined ratio of gears for every vehicle?
    Does it take two pulleys to make a ratio?

    For example, a gear has a gear ratio implemented by two pulleys.
    A gearbox is a set of gears.

    > I have been using my mind since all day and did not be able to finalize any ideas.
    It's called "paralysis by analysis".
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A Question On Inside the C++ Object Model
    By Antigloss in forum C++ Programming
    Replies: 1
    Last Post: 09-17-2010, 03:02 AM
  2. Replies: 1
    Last Post: 11-21-2009, 12:00 PM
  3. Win32 Thread Object Model Revisted
    By Codeplug in forum Windows Programming
    Replies: 5
    Last Post: 12-15-2004, 08:50 AM
  4. Simple thread object model (my first post)
    By Codeplug in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2004, 11:34 PM
  5. ATL Control Full Object Model
    By 7thSeeker in forum C++ Programming
    Replies: 6
    Last Post: 05-07-2004, 12:13 PM

Tags for this Thread