UML介绍+实战完美版课件.ppt

上传人:小飞机 文档编号:1455821 上传时间:2022-11-27 格式:PPT 页数:80 大小:4.36MB
返回 下载 相关 举报
UML介绍+实战完美版课件.ppt_第1页
第1页 / 共80页
UML介绍+实战完美版课件.ppt_第2页
第2页 / 共80页
UML介绍+实战完美版课件.ppt_第3页
第3页 / 共80页
UML介绍+实战完美版课件.ppt_第4页
第4页 / 共80页
UML介绍+实战完美版课件.ppt_第5页
第5页 / 共80页
点击查看更多>>
资源描述

《UML介绍+实战完美版课件.ppt》由会员分享,可在线阅读,更多相关《UML介绍+实战完美版课件.ppt(80页珍藏版)》请在三一办公上搜索。

1、UML介绍+实战,应用设计所2019.11.23,About learning UML stuff,What is a model?Why do we model?When do we model?How to use UML?,What is a model?,A model is a simplification of reality.,Why do we model?,We cannot comprehend such a system in its entirety.,We build models so that we can better understand the system

2、 we are developing.,Through modeling, we achieve four aims:,Models help us to visualize a system as it is or as we want it to be.Models permit us to specify the structure or behavior of a system.Models give us a template that guides us in constructing a system.Models document the decisions we have m

3、ade.,The larger and more complex the system to be, the more important modeling becomes.,The Principles of Modeling,Choose your models well.Every model may be expressed at different levels of precision.The best models are connected to reality.No single model or view is sufficient.,When do we model?,T

4、he sooner the better, and keep modeling in developing.,Object-Oriented Modeling&Algorithmic Modeling,What is the structure of a good object-oriented architecture?,Visualizing, specifying, constructing, and documenting object-oriented systems is exactly the purpose of the Unified Modeling Language.,B

5、uilding Blocks of the UML,Things(Structural things, Behavioral things, Grouping things, Annotational things)Relationships(Dependency, Association, Generalization, Realization)Diagrams(Structural Diagrams, Behavioral Diagrams),Things,Structural things(Class, interface, collaboration, use case, active

6、 class, component, artifact, node)Behavioral things(Interaction, state machine, activity)Grouping things(Package)Annotational things,Relationships,DependencyAssociationGeneralizationRealization,Structural Diagrams&Behavioral Diagrams,UML Structural Diagrams,Class diagram(Classes, interfaces, and col

7、laborations)Component diagram(Components)Composite structure diagram(Internal structure)Object diagram(Objects)Artifact diagram(Artifacts)Deployment diagram(Nodes),UML Behavioral Diagrams,Use case diagram(Organizes the behaviors of the system)Sequence diagram(Focuses on the time ordering of messages

8、)Communication diagram(Focuses on the structural organization of objects that send and receive messages)State diagram(Focuses on the changing state of a system driven by events)Activity diagram(Focuses on the flow of control from activity to activity),Class diagram,Realization(实现),Aggregation(聚合),Cl

9、ass diagram,Generalization(泛化),Association(关联),Composition(组合),Dependency(依赖),Class diagrams commonly contain:,ClassInterfaceDependency, generalization, realization and association relationships,Class,Operation,Attribute,Class name,“+” is public“-” is private“#” is protected,If the class is abstract

10、 class, the class name will be in italics.,Interface,Abstract Operation,Interface name,public interface IFly void fly();,Interface,Interface name,Realization Operation,public interface ILanguage void speak();,Generalization,public class Bird extends Animal,Realization,public class WideGoose implemen

11、ts IFly,Dependency,public abstract class Animal public Metabolism (Oxygen oxygen, Water water) ,Association,public class Penguin extends Birdprivate Climate climate;,Aggregation,public class WideGooseAggregateprivate WideGoose arrayWideGoose;,. has a .(weak),Composition,public class Birdprivate Wing

12、 wing;public Bird()wing = new Wing();,. has a .(strong),The same lifecycle.,Object diagram,Object diagram,对象,链,属性值,匿名对象,At a point in time,Use case diagram,Use case diagram,Actor(参与者),Relationships(关系),Subject(主题),Use case(用例),Use case diagrams commonly contain:,SubjectUse casesActorsDependency, gen

13、eralization, and association relationships,What is a use case?A use case is a description of a set of sequences of actions, including variants, that a system performs to yield an observable result of value to an actor.,Actor & Use case & Subject,Name,Actor,Use case,Login System,Subject,Interaction d

14、iagram,Sequence diagram,Life line(生命线),Execute specification(执行规约),objects(对象),Asynchronous message(异步消息),Return message(返回消息),Time,Synchronous message(同步消息),Communication diagram,链,对象,序号,消息,路径约束,Interaction diagrams commonly contain:,Roles or objectsCommunications or linksMessages,State diagram,Sta

15、te diagram,Initial state(初始状态),Simple state(简单状态),Events(事件),Transitions(转移),State diagram,TCPIP状态变迁图,Transitions(转移),State diagrams commonly contain:,Simple states and composite statesTransitions, trigers, and constraint,State diagram,Action(动作),Activity diagram,Activity diagrams commonly contain:,

16、ActionsActivity nodesFlowsObject values,Activity diagram,Android Activity Lifecycle,Component diagram,Component diagram,需接口,供接口,构件,依赖,使用,接口声明,实现,Component diagram,需接口,供接口,端口,构件声明,端口名,接口名,Artifact diagram,Artifact diagram,制品,依赖,Artifact diagram,Modeling Executables and LibrariesModeling Tables, Files

17、, and DocumentsModeling Source Code,Deployment diagram,Deployment diagram,How to use UML?,Forward Engineering&Reverse Engineering,Design UMLImplements,Forward Engineering,Reverse Engineering,We usually write code like this.,Poor Design,Simple Factory Design Pattern,Better designed, but not the best.,Factory Method Design Pattern,Best Design,Use UML, let codes become better!,UML Tools,IBM Rational Rose,Microsoft Visio,Visual Paradigm for UML (VP-UML),ArgoUML,UML Reference Book,UML用户指南,大象-Thinking in UML,UML和模式应用,大话设计模式,Thank U!,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号