简体   繁体   English

在线外卖订购服务的UML类图(类似于JustEat)

[英]UML Class Diagram for Online Takeaway Ordering Service (Similar to JustEat)

I am currently in the process of setting up Class Diagrams for an Online Takeaway Service, similar to that of JustEat. 我目前正在为Online Takeaway服务设置类图,类似于JustEat。

I don't really have much experience when it comes to creating UML Diagrams but I was wondering if someone could take a look at my current Class Diagram and perhaps give me some advice or correction to point me in the right direction? 在创建UML图时,我确实没有太多经验,但是我想知道是否有人可以看一下我当前的类图,也许可以给我一些建议或更正,以指出正确的方向?

I have attached a SCREENSHOT of my current progress. 我已附上我当前进度的屏幕截图

Many Thanks, Jay 非常感谢,周杰伦

Without knowing the business case it's impossible to elaborate on semantics. 在不了解业务案例的情况下,不可能详细说明语义。 However, here a few (mostly syntactical) tips: 但是,这里有一些技巧(主要是句法技巧):

  • Leave away the cls prefix in your classes. cls类中的cls前缀。 A capital first letter already indicates that its a class (or a type in general) 大写的第一个字母已经表明其类别(或一般类型)
  • In the same way let all your attributes and operations start wit a lower case letter. 同样,让所有属性和操作以小写字母开头。 It follows the same common convention as the previous. 它遵循与以前相同的通用约定。
  • Use role names. 使用角色名称。 Eg between Customer and Cart place the role name cart near the Cart to indicate that Customer has a cart attribute which is of type Cart . 之间如CustomerCart的地方角色名称cart不久的Cart ,表明Customer有一个cart的属性,它是类型的Cart
  • I would probably decouple the authentication from the Customer class and create an Authentication class on its own. 我可能会将身份验证与Customer类分离开来,并自行创建一个Authentication类。

I assume that the missing parameters and general void return values are due to the early stage of your design. 我认为缺少的参数和一般的void返回值是由于设计的早期阶段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM