Download presentation
Presentation is loading. Please wait.
Published byLeon Shelton Modified over 9 years ago
1
Modeling with UML The Unified Modeling Language (UML) is a standard graphical language for modeling an object-oriented software by providing a standard notation methods, selecting and integrating the best elements.
2
System Development Model It focuses on three different modes of the system that are represented in UML. These include: Functional model that describes the functionality of the system from the users point of view. Object model that describes the structure of the system in terms of objects, attributes, association, and operations
3
Dynamic model that describes the internal behavior(like exchange of messages among objects) in the system.
4
Five Basic Notations of UML 1.Use case diagrams 2.Class diagrams 3.Interaction diagrams 4.Statechart diagrams 5.Activity diagram
5
Use case diagrams provide a description of interaction between the users of the system termed actor and the high level functions within the system use case. These descriptions can be in summary or detailed form in which the interaction between the actor and the use case is descried in a step-by- step way.
6
S ReadTime SetTime ChangeBattery SimpleWatch WatchUser WatchRepairPerson System boundary Communication association
7
From the above diagram, the Watchuser(actor) may either consult the time of his/her watch using ReadTime(use case) or SetTime(another use Case). However, only the WatchRepairPerson(actor) can change the battery of the watch with ChangeBattery(use case).
8
Staff management Accountant S Add a new staff member Add a new staff grade Change the rate for a staff grade Calculate staff bonuses
9
Class diagrams describes the data found in a software. A class is represented as a box with its name written inside.The name should always be in singular and start with a capital letter( i.e when a class diagram is drawn,the system will contain a class diagram by that name, when the system runs, instances of the class will be created). It may also show the attributes and operations contained in each class.
10
Rectangle e.g. Rectangle get Rectangle getArea() Resize() height width height Width getArea() Getsize() The above diagram illustrates a class drawn at different levels of detail. How much you show depends on the phase of development and on what you wish to communicate. The 1 st diagram shows only the class name while others show the class name & operation, class name &
11
Attributes, class name, attributes & operation respectively. Interaction diagrams show how a set of actors and objects communicate with each other to perform the steps of a use case or of some other piece of functionality. The systems taken together is referred to as interaction while the communication shared ( like exchange of messages, commands) issue by actor through the to user interface are referred to as messages.
12
Elements that can be found in interaction diagrams are: Instances of classes or actors: instances of classes(i.e. are shown as boxes with the class and object identifier underlined. Actors are shown using same stick-person symbol as used in use case diagrams.
13
Messages are shown as arrows from actor to object or from object to object so as to understand the sequence of messages better. Note that it is advisable to always develop a class diagram and use case model before starting an interaction diagram(i.e. Knowing the actors and the objects involved).
14
e.g a student(actor) register in a course using the objects: student, course section and registration. requestToRegister () getPrerequisite() Course CourseSelection Registration addToRegistration () hasPassedCourse() Student addToScedule()
15
:Registration :CourseSection :Student requestToRegister AddToRegistrationList Create Interaction diagram of the class diagram.
16
Statechart diagrams are used to describe the external visible behaviour of a system or of am individual object. At any given point in time, the system or the object is said to be in certain state. It remains in this state until an event occurs that causes it to change state. It is represented by a rounded rectangle that contains the name of the state.
17
XTurn XWin OTurn OWin Tie Statechart diagram of noughts and crosses game. From the above diagram, player X goes 1 st, so the initial transition is from the start state points to Xturn. Then the game alternates between Xturn and Oturn states until the game ends. Three possible outcomes of the game represented by the end states include: i.X can win. ii.O can win. iii.There can be a tie which can be reached from both Xturn state and Oturn state.
18
Activity diagrams are used to understand the flow of work that an object or component performs. It is like a statechart diagram except that it has a few additional symbols used in a different context. The difference between statechart and activity diagram. Most transactions are caused by the external events in a statechart diagram while most transactions are internal events in an activity
19
diagram. There are two types of nodes for branching thread in an activity diagram: Decision node which has one incoming and multiple outgoing transition taken. Merger node has two incoming transitions and one outgoing transition used in bringing paths that had been splitted by the decision nodes together.
20
Receive course registration request [Not Full] [doesNotHavePrerequisite] Complete Registration Check special permission Verify course not full Check Prerequisites [No Permission] [HasPrerequisites] Full An activity diagram of the registration process.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.