Presentation is loading. Please wait.

Presentation is loading. Please wait.

UML – Universal Modeling Language IT 210 Introduction to Modeling.

Similar presentations


Presentation on theme: "UML – Universal Modeling Language IT 210 Introduction to Modeling."— Presentation transcript:

1 UML – Universal Modeling Language IT 210 Introduction to Modeling

2 Modeling Representing the world how it is— or how we want it to be We can change the world for better, and we should

3 “Today the information highway, with all of its means of communication, affords an opportunity for us to carry the mission with a thousandfold greater speed and ease than Peter, James, and John and the other intrepid disciples.” – President James E. Faust

4 Why Model? Create, Design, Communicate Create: Generate ideas, solutions Design: Consistent, coherent solutions (model) Communicate: Real world solutions

5 Abstract representation Complete solution has many aspects Abstract and generalizable Specific: this_num = 1 print this_num this_num = 2 print this_num … this_num = 20 print this_num Abstract: for num = 1 to MAX print num next

6 Software modeling Model process (sequence of activities) Changes of state Data structures Data structure types and with methods Need languages of abstraction …

7 UML – Diagrams

8 Approaches to UML Sketch Blueprint Programming Ref: Martin Fowler, “UML Distilled”

9

10 UML Diagrams - Activity

11 Example Juke Box

12 Juke Box with Partitions Also called swim-lanes

13 Source: CodeGear from Borland

14 UML diagrams - Sequence

15 Sequence – Juke Box

16 UML Diagrams - State

17 UML Goals Provide users with a ready-to-use, expressive visual modeling language so they can develop and exchange meaningful models. Provide extensibility and specialization mechanisms to extend the core concepts. Be independent of particular programming languages and development processes. Provide a formal basis for understanding the modeling language. Encourage the growth of the OO tools market. Support higher-level development concepts such as collaborations, frameworks, patterns and components. Integrate best practices.

18 Review The concepts on the following slides you should understand from CS 142. They are used in modeling.

19 Concept 1: Real world “thingy” Entity, object, noun-verb Something that has a name Something that has Identity Person, place, thing Something you can point at. Something that does stuff or has stuff done to it Can you think of another way to say it?

20 Entity/Object ERM Name Attributes Name Attributes Methods UML

21 Concept 2: Instance/Class Thingies are grouped by similar characteristics. “Person” is a class “Janet” is an instance

22 UML: Class/Instance Person Name:String Height:Real Weight:Real Create(name:String,Height:Real,Weight:Real) Delete() Class Fred:Person Name = Frederick G. Williams Height = 2.1 Weight = 50 :Person Name = Frederick G. Williams Height = 2.1 Weight = 50 Named Person Instance Anonymous Person Instance

23 Concept 3: Attribute Characteristic of an object that defines a member of a class.

24 Concept 4: Property Characteristic of an object that isn’t an attribute. For example: Height is an attribute of Person Location is not an attribute of the Person object we defined. Systems often “create” objects with attributes and “attach” properties. Note: This is not standard terminology, but it matches most of what Microsoft does. No standard diagramming approach.

25 Concept 5: Relationship Objects are related to each other in the real world. John husband of Mary Julio’s Ferrari Carburator part of engine Mary is a Girl Some relationships are special enough to have their own names and diagrams

26 Concept 6: Value Attributes can be assigned values. Properties can be assigned values.

27 Concept 7: Constraints Attributes, Properties, and Relationships can be “constrained”. What constraints are possible is determined by the semantics of the value or Relationship. Height must be greater than 0 A man can have only one wife at a time.

28 Concept 8: Cardinality Constraints You can count things. It is often important to constrain Cardinality of relationships: A person can only have one mother. A car can have only one VIN.

29 Cardinality leftrightexample 11one-to-one person weight 0..11 optional on one side one-to-one date of death person 0..* or * optional on both sides many-to- many person book 11..*one-to-many person language

30 Concept 9: Participation Objects participate in relationships. Sometimes you want to constrain an object’s participation in a relationship. A “rental” object must have a car

31 Concept 10: Key Something that identifies an object in a set of objects. Unique Key – no other object can have it. Composite Key – key made up of more than one attribute

32 Concept 11:Generalization Employee is a person. An Employee object has all the characteristics of a person, and then some.

33 Concept 12: Specialization Go the other way from Generalization. An object that has all of the attributes of a class, and then more attributes, is a member of the General class plus a class defined by all of the attributes.

34 Concept 13: Object/Entity A thingy with identity, Attributes and Methods is called an object. Of course, all of the abstract class English words have been overloaded so many times you better ask what someone means before you “assume” anything.

35 Concept 14: Inheritance A relationship between classes such that all of the attributes and methods of the super-class are projected into the sub-class. Two kinds Structure and Interface: difference beyond scope of lecture

36 Concept 15: Relationships with Attributes Sometimes a relationship between two objects can have attributes. John was married to Mary on January 3, 2999 Marriage date is not an attribute of either John or Mary. It is an attribute of their relationship.

37 Concept 16: System Modeling This class is WEB SYSTEMS which includes data modeling, however, objects are more than just state. UML also models processing and many other attributes of a system. Data modeling is a part of what UML calls structure modeling. What the TA’s call a UML is an ACTIVITY diagram.


Download ppt "UML – Universal Modeling Language IT 210 Introduction to Modeling."

Similar presentations


Ads by Google