Presentation is loading. Please wait.

Presentation is loading. Please wait.

- 1 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design A dvanced S ystems A nalysis and D esign Fall 2010 Convener: Houman Younessi.

Similar presentations


Presentation on theme: "- 1 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design A dvanced S ystems A nalysis and D esign Fall 2010 Convener: Houman Younessi."— Presentation transcript:

1 - 1 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design A dvanced S ystems A nalysis and D esign Fall 2010 Convener: Houman Younessi 1-860-548-7880 youneh@rpi.edu Lecture 5

2 - 2 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design UML has a an array of notations and diagrams for modeling in each of these three views. Structure Modeling Class notation, object notation, Associations, Links, Class diagrams, object diagrams,… Transformational Modeling Actors, Transformational relations, Use Case diagrams, Context Diagrams, Activity diagrams,Transformational definitions, …

3 - 3 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Causal (Dynamic) Modeling Events, Activities, Actions, Transitions, States, Sequence diagrams, Collaboration diagrams, Statechart diagrams, etc.… In the next session we shall start with structural modeling and introduce some important elements of the UML notation set.

4 - 4 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Structural Modeling: Answers the question WHAT? We need to concentrate on static relationships between objects (SNAPSHOT). So, we need to depict: ObjectsClasses Links Associations Class Diagram

5 - 5 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design CLASSES The implementation of a type A generator for instances A class is depicted as a solid-outlined rectangle with compartments: Must have a name compartment May have other compartments (up to 3 more)

6 - 6 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design The other compartments may contain: Compartment 2: Attributes Compartment 3: Operations Compartment 4: Others (Business rules, exceptions, etc.) Name Compartment Attributes Compartment Operations Compartment Other Compartment Widget color: Color position:Coord=(0,0) move(from:Coord,to:Coord=(50,50)) get_color( ):Color draw( ) draw_all( ) color /= “white”

7 - 7 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Class name and the class name compartment: The name compartment must be present The name compartment contains the name of the class. Class names are centered, begin with a capital letter and are in boldface. Abstract class names are italicized.

8 - 8 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Attributes and the attribute compartment: May be omitted when drawing high level diagrams Are denoted as left justified plain lowercase text strings The name may be followed by a colon ( : ) followed by the type of the attribute Optionally we can set the initial value of the attribute. To do so, the type name is followed by ( = ) and then the value

9 - 9 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design May contain a visibility tag. A visibility tag could be: +Public # Protected -Private

10 - 10 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Operations and the operations compartment: May be omitted when drawing high level diagrams Are denoted as left justified plain lowercase text strings. Abstract operations are italicized May have parentheses containing a comma separated list of the parameters of the method that implements the operation. Optionally the parameter list may have indicators. These are:

11 - 11 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design inParameter is only passed in to the operation outParameter is only passed out (returned) inoutBoth (Default is “in”) May have a return list containing one or a comma separated list of more than one formal parameters following a colon after the parameter list. Multiple return parameters, if there, must have a name and a type separated by a colon.

12 - 12 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design An operation may have a class scope. Class operations are underlined. May contain a visibility tag. A visibility tag could be: +Public # Protected -Private

13 - 13 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Attribute - color:Color=red Operation: # credit_rating(in candidate:Customer=current, in agency: Agent=dandb) : rating : Integer, reason : Text Usually we do not bother with this level of detail unless we aim to generate code automatically

14 - 14 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design TEMPLATES AND GENERIC CLASSES PAIR T1,T2 first:T1 second:T2 set_first(in T1) set_second(in T2) out( ): STRING Pair > (Integer,Integer) OR

15 - 15 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design OBJECTS An element of a type set. An instance of a class. An object is depicted as a solid-outline rectangle with up to 3 compartments: The top compartment is the name compartment. May have other compartments (up to 2 more)

16 - 16 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design The other compartments may contain: Compartment 2: Attribute values Compartment 3: Other Name Compartment Attributes Compartment Other Compartment doowak: Widget color=Red position=(10,45)

17 - 17 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Object name and the name compartment: The name compartment must be present The name compartment contains the name of the object; if a name exists. The name structure, if there, must be underlined. If the name is not there, or for “un-named” objects, the colon must remain. The name may be followed by a colon ( : ) followed by a comma separated list of class to which the object belongs.

18 - 18 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design :Widget color=Red position=(10,45) An un-known or un-named object : An object, any object

19 - 19 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Attribute values and the attribute values compartment: It is optional and may not be present. If present, it contains the names of the relevant attributes of the class of which this object is an instance and the values relating to that attribute. Only attribute names and values of interest should be shown.

20 - 20 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design RELATIONSHIPS There are three basic types of relationship between classes. These are: Inheritance Aggregation Association

21 - 21 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design INHERITANCE Parent Child 2Child 1 Discriminator …...

22 - 22 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Person FemaleMale gender Example:

23 - 23 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design AGGREGATION Two types in UML: Weak aggregation Composition Brain Person Department Professor Composition Weak aggregation

24 - 24 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design ASSOCIATIONS Association shows a named relationship between instances of a class and other instances of itself or between instances of two or more other classes. Class A Class B Role A:Class Role B:Class Name of Association Multiplicity

25 - 25 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Each association has two roles, each role is a direction on the association. These roles can be explicitly named on the association with a label. If not explicitly labeled, then the role name is the same as the target class and may be omitted. Order Person customer Is placed by

26 - 26 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design ABABABAB 1 1..* 0..1 * An A is always associated with exactly one B An A is always associated with one or more B An A is always associated with zero or one B An A is always associated with zero or more B AB n An A is always associated with exactly n B n..m An A is always associated with n to m B Where n is any integer number greater than 1 Where n,m are integer numbers and m>n AB

27 - 27 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design An association may have direction. When it does, the direction is shown with an arrow. AB In the above diagram, A, is called the source and B is the target. A bi-directional arrow indicates navigability in both directions. AB

28 - 28 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design An association with a “many” side may be ordered. Ordering is shown as a label on the target class. Screen Window * {ordered} Visible on

29 - 29 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design An association may be higher than binary. A Ternary Association Name Class A Class B Class C

30 - 30 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design reservation Person Flight Seat Example:

31 - 31 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Association Attributes Person Accesses File * * permission Association Attribute

32 - 32 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design Employee sales rep 0..1* Corporate Customer Personal Customer Product contactName creditRating remind() bill(Real) creditCard# Customer name address rating():Integer 1 {if Order.customer.rating = 5 then Order.isPrepaid := True} * line item Order 1 * dateReceived: Date isPrepaid:Boolean number:String price:Money dispatch() close(Real) quantity:Integer price:Money isFilled: Boolean creditRating() >=4 Courtesy: Martin Fowler, with some changes by Houman Younessi Order Line


Download ppt "- 1 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design A dvanced S ystems A nalysis and D esign Fall 2010 Convener: Houman Younessi."

Similar presentations


Ads by Google