根据以下规范,此UML的设计是否正确。另外,我非常抱歉UML是手写的,因为我无法在我的电脑上安装IMB RSA而找不到合适的替代品。
这是规范
Consider a new mobile app (BuzApp) to be developed by Tyler Hill
University to help its community and visitors to identify the most
convenient bus stop. The University has several bus stops dispersed on
a wide geographical area, which are served by several bus routes. The
purpose of the app is to help the University community members
(students and staff) and visitors to find the most convenient bus stop to
reach their final destinations. Based on the routes and positions of the
buses, and on the position of the app user, the app should be able to
localise the best bus stop based on: the time it takes for a bus to arrive
at a particular bus stop, and the time it takes a user to reach that same
bus stop. The average walking speed is fixed for visitors, but for the
community members is calculated based on historical data.
The app will rely on bus companies for providing the bus routes, the
positions of its buses, and the time it takes for a bus to reach a
particular bus stop, together with the information whether a particular
bus is full or not. The app will rely on the University Campus Services
for providing the maps, the pedestrian paths, which include short cuts
that are only available to community members depending on their
University status that is captured by their personal card number
(HillOne).
如果你能让我知道如何改进它会很棒。我发现通过阅读规范来创建UML类图非常困难,任何关于读取规范和转换为UML的最佳方法的指针都会有很大的用处。
答案 0 :(得分:3)
简短的回答是你的设计似乎不正确。您完全错过了问题域。
您应该对提供给您的文本中描述的问题域进行建模,而不是直接设计一些解决方案。例如,概念在哪里a
,Bus Stop
,Geographical Area
,Bus Route
,Location
,Bus
,Traversal Duration
,{ {1}}?他们之间的联系在哪里?什么是关联结束的多重性和名称?在每个班级中,哪些非技术行为自然有意义?忽略问题域是危险的,正如我最近在another similar question中解释的那样。