Uml

Post on 15-Nov-2014

706 views 2 download

Tags:

description

 

Transcript of Uml

UML

Unified Modeling Language

Use Case Diagram

System:something that performs a function (a piece or multiple pieces of software that performs some sort of function for its use)

the actor and the use cases are part of a single system

Actors: something that uses our system (person, another system)The actor is the entity that initiates the use case.

An actor Use case

Relationships:

Association is the communication path between the actor and a use case that is participates in.

Inclusion enables you to reuse one use case's steps inside another use case

Extension

allows you to create a new use case by adding steps to an existing use case

Generalization

use cases can inherit from one another. The child use case inherits behavior and meaning from the parent, and adds its own behavior.

wherever You can apply the child, you apply the parent. The generalization relationship can exist between

actors as well as use cases

Class Diagram

Relationships:Two classes can relate to each other with a line and an association name.

A pointer that shows the direction of the association follows the association name.

Multiplicity: Multiplicity allows us to indicate how many objects of one class relate to one object of another class.

Roles:

The use of a role in a class diagram helps the reader to understand what the first class does for the second.

Examination Web Site System

Selling System

The Elevator simulation

Person riding the elevator to the second floor

Person walking away from elevator

Use-case diagram for elevator simulation from user's perspective

Use-case diagram from the perspective of a Person.

A more detailed level

Elevator controller

Floor button

Elevator buttonElevator motor

Door motorOpen door

close door

Move up

Move down

Starting to model the Classes for the Elevator Simulation

Classes with attributes

Identifying Class Operations

An operation of a class is a service that the class provides to the clients (users) of that class.

Verb phrases for each class in simulatorClass Verb phrases

Elevator moves to other floor, arrives at a floor, resets elevator button, rings elevator bell, signals its arrival, opens its door, closes its door

ElevatorShaft turns off light, turns on light, resets floor button

Person walks on floor, presses floor button, presses elevator button, rides elevator, enters elevator, exits elevator

Floor [none in the problem statement]

FloorButton requests elevator

ElevatorButton closes elevator door, signals elevator to move to opposite floor

FloorDoor signals person to enter elevator (by opening)

ElevatorDoor signals person to exit elevator (by opening), opens floor door, closes floor door

Bell [none in the problem statement]

Light [none in the problem statement]

ElevatorModel creates person

Classes with attributes and operations

االعتبار Use Case Diagramارسم بعين األخذ بعد التالي للتطبيقالتالية : المتطلبات