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.
Creation of Object Model Using UML Conventions
object oriented design;uml;domain model
You're looking for general help with design of models for your problem statement.  Since this website is not a general purpose design service, we're not going to do a design for you.  But perhaps we can at least give some general advice, and provide constructive criticism for your problem statement (and current design, if you had one).Modeling is done by identifying concepts (types) and their relationships (associations).  On top of that, we can add constraints that prevent certain undesirable things from happening, constraints can range from simpler required cardinality ranges in the relationships, to broad expressions of what is and isn't allowed.A model is, by definition, an abstraction; abstraction is the omission of irrelevant detail to the problem domain and to the ultimate usage of the model.  In order to know what to model and what not to model, you have to understand how the model is going to be created and used.Part AMy preference is to model even the simplest entities as concepts/object rather than as attributes, for starters, and later as an optimization, refactor entities into attributes when it is clear that the model doesn't need a level of detail for that type of entity (but rather just a value for those entities).So, a perfectly good model for starters would be to model a gearbox as a collection of pulleys, and gears (and possibly gear ratios -- unless the ratios are derived from the pulleys and gears).~~~If it's the Case 1 or Case 2, how are we gonna show the predefined ratio of gears for every vehicle?This depends heavily on what needs to be modeled, which is not clear from the problem statement.  Seek clarification for how the model will be used (so you know what needs to be captured, and so you know how to compute derived answers).  In the simplest case, you just model the gear ratios directly as entities (or attributes).  Otherwise, you need the problem statement to tell you how to compute or derive gear ratios from the gearbox of pulleys and gears, and you'll need to store the gears and pulleys in valid arrangements that let you compute the gear ratios.Part BSo, how do we show the number of gears to all three types of vehicles?Each car presumably has a gearbox.  There is no need to connect components inside the gearbox to the car: simply connect each type of car to one (or more) gearboxes, the transitive relationships will suffice to connect cars to gears.  Thus, to get from car to gears, we traverse thru its gearbox.You could store, for each car, a copy of the number of gears, originally computed from the gearbox.  However, this would represent caching of information, which is an design-complicating optimization that one should not undertake without clearly measured evidence that such an optimization is important for some reason.Part CThe larger the numbers of gears the larger will the number of pulleys and vice versaThis is a statement of fact, a logical statement, a rule, if you will.  It says that if we add one gear to a gearbox design, we have to have more pulleys, and if we add a pulley, we'd have to have more gears.  (It doesn't tell us that it is or should be valid to add one gear or one pulley to an otherwise valid design, though.)However, it isn't really precise: it could be that we need two gears per pulley or two pulleys per gear.  You need to seek clarification from the problem domain.  If the relationships is a simple one of the the 2:1 relationships I suggest, then you should model this (a gear being related to two pulleys, or a pulley being related to two gears), and you won't otherwise have to model this rule/statement of fact because this will suffice to enforce that.However, in the most broad sense, this might be thought of as a constraint, which you can apply in some form, though this is a difficult constraint to model in the most general case because it specifies a relationship between different gearbox designs without otherwise saying what any single valid/legal design might be.  Thus, I could say I have 4 pulleys and 12 gears, and this statement of fact, this rule, would offer nothing in terms of validation (without access to other known valid designs, and, how did those known valid designs get validated??).  All the rule says is that if one design is valid/legal, than another design with more gears has more pulleys.  It is a hard statement to work with, and should send you back to the problem domain seeking clarification.