uml

How can I do a good design for this model?

自古美人都是妖i 提交于 2020-01-25 22:21:30
问题 I'm a beginner creating diagram classes. The necessity obligates me to do a good model. The solution is for a math quiz. The system must generate each problem and check the answer. I'm going to show my general classes: Here there is the casses interface IProblemFactory<T> where T : Problem<T> { T Create(); } public class ArithmeticProblemFactory : IProblemFactory<Arithmetic> { // This generates Arithmetic problems public Arithmetic Create() { } } // And the others types of problems Then I've

How can I do a good design for this model?

狂风中的少年 提交于 2020-01-25 22:20:53
问题 I'm a beginner creating diagram classes. The necessity obligates me to do a good model. The solution is for a math quiz. The system must generate each problem and check the answer. I'm going to show my general classes: Here there is the casses interface IProblemFactory<T> where T : Problem<T> { T Create(); } public class ArithmeticProblemFactory : IProblemFactory<Arithmetic> { // This generates Arithmetic problems public Arithmetic Create() { } } // And the others types of problems Then I've

OO完结篇-第四单元小结

人走茶凉 提交于 2020-01-25 12:30:36
OO第四单元小结 一.作业架构分析。 1.第一次作业 本次作业需要完成UML类图查询。 难点在于初次接触UML,需要对UML进行一定程度的学习和理解。 思路主要是根据每个传进来的element获取其type然后进行分类以及层次化处理,由上而下,先找到所有的接口和类,构建Myclass和MyInterface,来管理类和接口的下层元素以及继承实现关系等信息。由于查询考虑到继承,所以还需要进行适当的信息建模,以便进行记忆化递归搜索。 具体架构如图: 2.第二次作业    本次作业需要完成UML顺序图和状态图的查询,检测三个规则。    难点在于三个规则的查询以及新的两个图的建模。 首先根据在第一次作业基础上,新建一个类来检查有效性,考虑使用离散化建模后来进行循环继承的查询。其余的思路同第一次作业,从上往下建模。 具体架构如图: 二. 四个单元中架构设计与OO方法理解的演进 第一单元:多项式求导 第一次作业现在看来虽然简单,但是对于当时仅达到了解基本语法水平的我还是比较困难,主要是在于类之间的数据交互以及层次化地设计。但是第一二次作业我都使用了大正则来进行错误格式的判断,以及没有将各种多项式运算组合分散开,导致第三次作业完成得非常困难。但是完成第三次作业之后,发现之后的作业在层次化、基本架构有了较高的提升,代码复用性也慢慢变好。 第二单元:电梯

The difference between Aggregation and Association in implementation

微笑、不失礼 提交于 2020-01-25 02:47:48
问题 I have read a lot of theory regarding object relationshisps, and I am still having difficulty understanding how are association and aggregation seperated from implementaion point of view . In both cases you will have object B as a data member in object A, where it is present there as a reference,(unlike with composition where it exists there by value). So what is the difference between the two cases really? I have read somewhere that some Java gurus consider aggregation a solely abstract

Abstract Class from UML to ER diagram. Possible ? How?

梦想与她 提交于 2020-01-25 00:13:29
问题 I have the below UML class diagram with Abstract Class, and sub-Classes that extends from it. and i want to make an ER diagram using this class diagram. My question is how can i represent the Abstract class in ER diagram ? as a Table ? or should i just ignore it ? Thank you. 回答1: There are basically three choices to translate generalization into a database model 1. One table per concrete class Create tables Admin , Teacher and Student . Each of these table contain columns for all of the

Which class structure would be most suitable for the set up?

拈花ヽ惹草 提交于 2020-01-24 19:34:10
问题 I am working on a university assignment for a Object Oriented design module. Following linguistic analysis of nouns and verbs, and identification of use cases, the class diagram is now being made. The relevant parts of the program are as follows: The program is used by shop employees. There is a list of products that represent what is in the shop. Each product has unique details, including associated supplier and delivery company (which can have parent class called 'external company'). There

How to represent a static relationship in an UML class diagram

China☆狼群 提交于 2020-01-24 07:30:11
问题 I'm having trouble finding a good answer for how to represent a relationship between two classes A and B, where an instance of A is a static (class scope) variable in B. For example: class A { } class B { static A a; } I'm not even sure if it is a regular association or a dependency (or something else?). One idea would be to use a stereotype on the role name of A in the relationship, but I have never seen that done. And since I understand that it is 'rule' not to use both an attribute and a

How to represent a static relationship in an UML class diagram

南楼画角 提交于 2020-01-24 07:29:04
问题 I'm having trouble finding a good answer for how to represent a relationship between two classes A and B, where an instance of A is a static (class scope) variable in B. For example: class A { } class B { static A a; } I'm not even sure if it is a regular association or a dependency (or something else?). One idea would be to use a stereotype on the role name of A in the relationship, but I have never seen that done. And since I understand that it is 'rule' not to use both an attribute and a

Typical uml diagram for showing events

橙三吉。 提交于 2020-01-24 04:32:06
问题 I have a couple modules. They communicate to each other through events. What UML diagram would typically be used to show this? Is there a non uml diagram people use? Any examples? 回答1: I think you definitely want a sequence diagram to show all the event interaction between modules in sequence. This is the preferred way to represent sequence of asynchronous messages between components 回答2: If you want to express the fact that a module A fires an event E that is handled by module B, I suggest a

UML设计技术 用例图

穿精又带淫゛_ 提交于 2020-01-23 21:43:53
用例图介绍 用例图(Use-Case Diagram),是指由参与者(Actor)、用例(Use Case),边界以及它们之间的关系构成的用于描述系统功能的视图。用例图可以直观呈现系统与功能模块之间的互动关系,便于软件设计初期的建模。借助于用例图,开发相关人员,客户与专业人士能够以可视化的方式对问题进行探讨,减少了大量交流上的障碍,便于对问题达成共识。 用例图关键要素 参与者 参与者是指独立于系统,并与系统存在交互的对象,可以是人,物体,其他系统等等。 系统边界 设计系统,需要明确系统边界,知道哪些是系统内部的东西,哪些是系统外部的东西,方便后期的统一设计规划。 用例 系统里面的功能,模块或者属性,行为等。 关系 参与者与用例的关系,参与者与参与者的关系 关系的介绍 不同的关系用不同的线条来表示,以下是主要关系。 包含(include) 比如管理学生信息,包含增添学生信息,修改学生信息,删除学生信息,一般是对行为与功能的进一步细化,细化的程度需要掌握好,不然设计的用例图效果不好。 扩展(extend) 例如,查询操作可以对结果进行导出、打印。对于查询而言,能不能导出、打印,查询都是一样的,它们不是必须做的操作。扩展一般是行为与功能的一些可选,非必须的细化操作。 泛化(generalization) 比如车和公交车,是一种继承泛化的关系。 关联(Association)