使用UML约定创建对象模型 [英] Creation of object model using UML conventions

查看:83
本文介绍了使用UML约定创建对象模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题陈述来制作一个对象模型。



问题陈述:每辆车都有一个引擎变速箱。变速箱由根据预定传动比工作的滑轮组成。汽车有较小的发动机,4-6档,而运动型多用途车(SUV)有更大的发动机4-8档。另一方面,重型车辆(HDV)设计用于运输货物,因此具有8-16档的巨大发动机。齿轮数量越大,滑轮数量越大,反之亦然。



好​​吧,我已经完成了所有的对象模型,但是有让我困惑的三件事:



A)它所说的部分变速箱由根据预定齿轮比工作的滑轮组成,我们需要



~~~案例1:拿 装备 滑轮 作为一个物体,并将物体 变速箱 的成分与齿轮和滑轮的关系



~~~案例2:将 gear 滑轮 作为对象的属性 变速箱



~~~如果是案例1或案例2,我们将如何显示预定义的每辆车的齿轮比例?



B)它所说的部分汽车有更小的发动机,4-6档......运动型多功能车车辆(SUV)拥有更大的发动机,4-8档......重型车辆(HDVs )拥有8-16档的巨大发动机。那么,我们如何显示所有三种类型车辆的齿轮数量?如果根据Confusion(A)我们选择了Case 1并制作了对象齿轮,我们是否需要将它连接到所有三个对象 Cars SUVs HDVs 在他们之间建立联系或者如果我们从Confusion(A)中选择案例2那么我们是否需要显示否齿轮作为所有三个物体中的属性 汽车 SUV HDVs



C)表示的部分齿轮数量越大,滑轮和副齿轮的数量越大反之亦然,我们应该如何在对象模型中展示这种关系?



亲切的是,任何人都可以帮助我。我一整天都在使用自己的想法而且无法完成任何想法。先谢谢了。



我尝试过:



我有上面解释了我想出了什么想法,但我很困惑,我应该使用哪种想法会有效。

解决方案

我的第一个建议是你读过并观看一些关于UML的教程来理解这些东西。你将不得不谈论或写下你的解决方案。第二,你使用一些铅笔和纸,并绘制这些关系。



提示:



- 一辆车有一个齿轮箱

- 变速箱由一些齿轮组成(一个齿轮组)齿轮)和滑轮



今天我将尝试使用 Argo UML

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.

解决方案

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.


这篇关于使用UML约定创建对象模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆