Professional Documents
Culture Documents
27/09/2011
1 / 160
UML
The UML is a graphical language for visualizing specifying constructing documenting artifacts of a software-intensive system.
Artifacts include:
deliverables, such as requirements documents, functional specifications, and test plans materials that are critical in controlling, measuring, and communicating about a system during development and after deployment
27/09/2011 Dr. Farhana Jabeen 2 / 160
UML
It is a industry-standard graphical language for specifying, visualizing, constructing, and documenting the artifacts of software systems The UML uses mostly graphical notations to express the OO analysis and design of software projects. Simplifies the complex process of software design Use graphical notation: more clearly than natural language (imprecise) and code (too detailed).
27/09/2011
3 / 160
UML
UML can be used in all phases of software development specification of requirements, architectural design, detailed design and implementation There are different types of UML diagrams for specifying different aspects of software: Functionality, requirements
Use-case diagrams
Behavior
State diagrams, Activity diagrams
Communication, interaction
Sequence diagrams, Collaboration diagrams
27/09/2011
4 / 160
UML
There are tools which support UML
Can be used for developing UML models and analyzing them
IBMs Rational Rose is a software development tool based on UML. It has code generation capability, configuration management etc. http://www.rational.com/ Microsoft Visio has support for UML shapes and can be used for basic UML diagram drawing. http://www.visual-paradigm.com/ ArgoUML (http://argouml.tigris.org/), open source tool for developing UML models USE (http://www.db.informatik.uni-bremen.de/projects/USE/) an open source tool which supports UML class diagrams and Object Constraint Language
Dr. Farhana Jabeen 5 / 160
27/09/2011
Modelling
State State Diagrams Class Diagrams Diagrams
Scenario Scenario Communication Diagrams Diagrams (Collaboration) Diagrams Scenario Scenario Diagrams State Machine Diagrams Diagrams
Models
Activity Diagrams
Dr. Farhana Jabeen
Diagrams
27/09/2011
6 / 160
Modelling Modeling consists of building an abstraction of reality. Abstractions are simplifications because:
They ignore irrelevant details and They only represent the relevant details.
27/09/2011
7 / 160
Structural Diagrams Used to visualize, specify, construct, document static aspects of system
class diagram package diagram [not standard UML] object diagram component diagram deployment diagram
27/09/2011
8 / 160
Behavioral Diagrams Used to visualize, specify, construct, document dynamic aspects of system
use case diagram (usually) sequence diagram communication (collaboration) diagram state machine diagram activity diagram
27/09/2011
9 / 160
A full set of use case diagrams shows all the procedures available for interaction with the system. It is a summary of system functionality. Use Cases specify the behavior of the system Helps visualize the system
27/09/2011
10 / 160
UML (USE CASE Diagram) The two main components of a use case diagram are use cases and actors. An actor represent roles that humans, hardware devices, or external systems play while interacting with a given system They are not part of the system and are situated outside of the system boundary Actors may be both at input and output ends of a use case A use case is an external view of the system that represents some action the user might perform in order to complete a task.
27/09/2011
11 / 160
The use case model is the set of all use cases. It is a complete description of the functionality of the system and its environment Use Case
A set of scenarios related by a common actor and a goal A description of sequences of actions performed by a given system to produce a result for an actor Use cases specify the expected behavior [what], and not the exact method of making it happen [how] To name the use cases, give it a verb name to show the action that must be performed Describe a transaction completely
27/09/2011 Dr. Farhana Jabeen 12 / 160
For example a user placing an order with a sales company might follow these steps.
Browse catalog and select items. Call sales representative. Supply shipping information. Supply payment information. Receive conformation number from salesperson.
27/09/2011
13 / 160
It is important to define the basic flow of a use case before building the structure of the several flows that are part of it. If the speed with which the use case is completed by the actor is important, then it must be optimized to be as efficient as possible for the user.
27/09/2011
14 / 160
27/09/2011
15 / 160
27/09/2011
16 / 160
27/09/2011
17 / 160
27/09/2011
18 / 160
For this case study, the task is of constructing the design elements for a system that can be used to manage courses and classes for an organization that specializes in providing training. The name of the system is Courseware System.
27/09/2011
19 / 160
27/09/2011
10
USE CASE Diagram The following terms and entities are specific to the system:
Courses and Topics that make up courses Tutors that teach courses Course Administrators who manage the assignment of courses to tutors Calendars and Course Schedules that are generated as a result of the work performed by the course administrators Students who refer to Calendars and Course Schedules to decide which courses they wish to take up for study
27/09/2011
21 / 160
Use Cases
Manage courses: View courses, Manage topics for a course, and Manage course information Manage tutors: View course calendar, View tutors, Manage tutor information, and Assign courses to tutors
27/09/2011
22 / 160
11
27/09/2011
23 / 160
27/09/2011
24 / 160
12
USE CASE Diagram : ATM requirements Capture A simplified Automatic Teller Machine Which requirements are to be captured? The activities in Requirement capture
Identification of system boundaries: actors and use cases Diagramming use cases Elaborating scenarios Diagramming scenarios
27/09/2011
25 / 160
27/09/2011
26 / 160
13
Interface
Keyboard and screen, with menus The customer may cancel the current transaction at meaningful points
27/09/2011
27 / 160
27/09/2011
28 / 160
14
ATM example
Customer using the teller machine Bank Maintenance technician What about the card itself?
Technician
27/09/2011 Dr. Farhana Jabeen 29 / 160
Customer
Bank
Use Cases
Maintain Technician
27/09/2011 Dr. Farhana Jabeen 30 / 160
15
Use Cases
Handle Session
include
Verify Card
include
Handle Transaction
include include
Authentify Customer
extend
Get Customer Information
Deliver Receipt
31 / 160
27/09/2011
Handle Transaction
16
Specialized
27/09/2011
33 / 160
27/09/2011
34 / 160
17
Use Case and Scenarios Use cases classify the ways of using the system To each use case correspond many possible usage scenarios Thus scenarios
are instances of use cases specify use cases
27/09/2011
35 / 160
27/09/2011
36 / 160
18
Event flow: 1. Passenger selects the number of zones to be traveled. 2. Distributor displays the amount due. 3. Passenger inserts money, of at least the amount due. 4. Distributor returns change. 5. Distributor issues ticket.
37 / 160
27/09/2011
27/09/2011
38 / 160
19
Use Case: Handle Session Precondition: the ATM is free Primary Scenario 1. The Customer inserts the card into the ATM. 2. The ATM verifies the card validity. 3. The Customer authentifies with the ATM. 4. The ATM gets the Customer information from the Bank. 5. The Customer selects a transaction. 6. The Customer quits. 7. The ATM ejects the card. Postcondition: the ATM is free
27/09/2011
27/09/2011
40 / 160
20
Use Case : Class Assignment We are currently facing a crisis in grading your midterms. We know the steps to do this, but cant somehow figure out how it all works together. The TAs create sample answers to the midterm. They also create a grading rubric. The professor then goes through both of them, and approves or makes necessary modifications. The reader then takes the approved sample answers and the grading rubric and grades the midterm. The TAs finally collect the grades from the reader and enter them on the Glookup system.
27/09/2011
41 / 160
27/09/2011
42 / 160
21
Class Diagram
Class diagram describes Types of objects in the system Static relationships among them Two principal kinds of static relationships Associations between classes Subtype relationships between classes Class diagrams represent the structure of the system. Used during requirements analysis to model problem domain concepts during system design to model subsystems and interfaces during object design to model classes.
27/09/2011
43 / 160
Class Diagram
design: specifying the structure of how a software system will be written and function, without actually writing the complete implementation a transition from "what" the system must do, to "how" the system will do it
What classes will we need to implement a system that meets our requirements? What fields and methods will each class have? How will the classes interact with each other?
27/09/2011 Dr. Farhana Jabeen 44 / 160
22
What are some things that are not represented in a UML class diagram?
27/09/2011
45 / 160
23