110 likes | 350 Views
MORE UML DIAGRAM TYPES. We have seen a number of UML diagram types while studying our example. These slides show examples of a number of diagrams types not seen in our previous slides. Again, for full notation and syntax, refer to http://www.uml.org. Object diagram. car2 : Sedan.
E N D
MORE UML DIAGRAM TYPES • We have seen a number of UML diagram types while studying our example. • These slides show examples of a number of diagrams types not seen in our previous slides. • Again, for full notation and syntax, refer to http://www.uml.org Software Engineering 2003 Jyrki Nummenmaa
Object diagram car2 : Sedan car1: Sedan registration_no = ABC-123 registration_no = XYZ-999 This is really like a class diagram, but has objects instead of classes. : Garage car2 is an instance of class Truck Software Engineering 2003 Jyrki Nummenmaa
Constraints OCL-language 1 own * Company {(self.husband->size=1 implies self.husband.sex = male) and (self.wife->size=1 implies self.wife.sex = female) and not(self.wife->size=1 and self.husband->size=1)} Person husband 0..1 sex {xor} 0..1 wife Ministry 0..1 manage 1 Software Engineering 2003 Jyrki Nummenmaa
Collaboration Diagram Shows the calls between classes, but not their order (which is shown in sequence diagrams). 1.1: return() car: Sedan : GarageControl 1: returnCar garage: Garage 1.2: store(car) GUI Software Engineering 2003 Jyrki Nummenmaa
State Diagram A state diagram represents how objects (instances of a class) react to external events (message). • Typically used to specify the behaviour of so-called active objects. • Is composed of states (combination of attribute values at some point of time) and transitions between them. • May include an initial state and a final state. Software Engineering 2003 Jyrki Nummenmaa
State Diagram Initial state return/ Stop counting time Available InUse take/ Start counting time ready service InService Booked exit/ book Software Engineering 2003 Jyrki Nummenmaa
Activity diagram An activity diagram represents how an activity is performed • Formally, this is a special case of a state diagram • Typically a higher-level activity with several actors. • The diagram can be partitioned into columns, which show the actors Software Engineering 2003 Jyrki Nummenmaa
Activity Diagram Initial state Client Official Book Query Forkthreads :Bill [open] Make a bill Jointhreads Preparecar Pay :Bill [paid] Registerrental Take car Finalstate Software Engineering 2003 Jyrki Nummenmaa
Packages Controller Objects Support 1 Object 1 Storage ObjectManagement use return() book() take() * 1 returnObject(Object,Storage) bookObject(Object)takeObject(Object) Sedan Garage registrationNo service(int km) return() Software Engineering 2003 Jyrki Nummenmaa
Packages in closed form Database Support Software Engineering 2003 Jyrki Nummenmaa