Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO...

17
Intro to UML OOP Tirgul 10 2006
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    217
  • download

    3

Transcript of Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO...

Page 1: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Intro to UML

OOP Tirgul 10

2006

Page 2: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

UML

• UML is a graphical representation scheme for modeling OO systems

• UML today is a unification of various popular notational schemes.

Page 3: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

UML Diagrams

• There are 13 types of UML diagrams.

• We will concentrate on two diagrams :

– Use Case Diagram – What is required – Class Diagram – How to implement what is

required

Page 4: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Use Case Diagram

• The purpose of a Use Case Diagram is to organize define what is required from our system to perform.

• The diagram consists of:– Users (which can be humans or other

modules of software/hardware)– Possible uses– Associations from users to uses.

Page 5: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.
Page 6: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.
Page 7: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Use Case ExampleAutomatic Teller Machine

• Who does the ATM interacts with ?

• What are the uses of an ATM ?

Page 8: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Use Case (1) – User interaction

Page 9: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Use Case (2) – User and bank interaction

Page 10: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Class Diagrams

• The purpose of a class diagram is to define the classes in the system, and the relations between them.

• The diagram consists of Classes and relation marks

Page 11: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Class

ATM

int _moneyLeft

List _transactions

void displayWithdrawlValues()

….

Class name

Attributes

Methods

Page 12: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Association Relation

At any given point in the program flow, one object of ATM participates in an association with zero or one objects of withdrawal.

The role name of the withdrawal.

Page 13: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Composition Relation

• Only one class is the “whole”, the class which contains the other classes.

• The parts that are included in the “whole”, can exist only if a “whole” exists

• A part may belong to one “whole” at a time.

Page 14: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Composition Relation

Composition is represented by a straight line with a diamond at the end. The numbers represents the number of associated objects.

Page 15: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Aggregation RelationA screen object can exist independently, and an ATM can be associated with more than 1 screen.

Page 16: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.

Inheritance Relation

Using an ATM which is more than 500 meters from a bank office, involves paying special commission

Page 17: Intro to UML OOP Tirgul 10 2006. UML UML is a graphical representation scheme for modeling OO systems UML today is a unification of various popular notational.