Professional Documents
Culture Documents
Use Case
Use cases are simply written stories that capture some user-visible function of the system describe interaction between users and the system achieve a discrete goal for the user Use cases are text documents, not diagrams, primarily an act of writing text, not drawing. However, the UML defines a use case diagram to illustrate the names of use cases and actors, their relationships and interactions
USE CASES
An actor is a user of a system in a particular role (an actor can also be an external system) For example. Our system will have an actor BookBorrower representing the person who interacts with the system to borrow a book
A use case is a task which an actor needs to perform with the help of the system, such as Borrow copy of Book.
Let us suppose that after discussing priorities with the customers we decide that the first iteration of the system should provide:
Borrow copy of book, Return copy of book, Journal Borrow journal, Return
Includes/Uses Relationship
Used when you have similar behavior across a number of use cases In this case one use case uses another Used when you are repeating yourself in two or more separate use cases and you want to avoid repetition
10
Sequence Diagrams depict the objects and classes involved in the scenario and the sequence of messages exchanged between the objects needed to carry out the functionality of the system.
11
12
Operation Contracts
System Operations Operations that the system as a black box offers in its public interface Identified while creating SSDs
Entire set of all system operations across all Use Cases defines the System Interface
BITS Pilani, Pilani Campus
14
15
Identifying Classes
In the standard jargon of analysis we often talk about the key domain abstractions. Identifying the right classes is one of the main skills of OO development. We start the process of identifying the key domain abstractions using the following approach, which is known as the noun identification technique.
multiplicities
22
Sequence Diagram
Consider what happens in the library scenario when a user wishes to borrow a copy of a book. The library member must first check that they are able to borrow a book (i.e., they have borrowing privileges, there exists at least one remaining copy of the book etc.).. Then the copy object must be informed that the library member wishes to borrow the copy of the book.. Finally the copy object must then tell the individual book object that it is out on loan and thus no longer available. We now see how this is recorded in a sequence diagram
Schedule Season
Judge
Scoring
<<uses>>
Scheduler
Candidate Classes Season Meet Event Trial Competition Judge Gymnast Team Club League
Domain Model
Competition Event
performances
Trial
League performances participants Club competing teams Team competitors members Gymnast
Naming Relationships
Name relationships and roles Use meaningful concise names A good name is simple and provides significant semantic information
Season
tournament
Meet
Club
+members
Gymnast
A design class diagram illustrates the specifications for SW classes and interfaces. Typical information included:
Classes, associations, and attributes Interfaces, with their operations and constants Methods Attribute type information Navigability Dependencies
Discovering Operations/Methods
It is useful to work with object interaction diagrams when discovering operations
Some operations are identified in the conceptual perspective; more are identified in the specification perspective
RESORT RESERVATION
Book a Meeting room Book a Ccttage << ACTOR>>
<< ACTOR>>
Canel Booking
Client Print Reports Print Cash Receipt
Recepti onist
System Boundary
Identification of Classes
Step 1: identify candidate classes Using nouns: extract objects from the nouns in the requirements Data flow: start with inputs and determine what objects are needed to transform the inputs to the outputs Using the things to be modeled: identify individual or group things such as persons, roles, organizations, logs, reports in the application domain that is to be modeled; map to corresponding classes
26-Oct-13
Noun identification: Case Study Design the software to handle reservations at Blue Lake Resort. The resort comprises several cottages and two meeting rooms. Cottages can comprise from one to three beds. The first meeting room has a capacity of 20 persons, the second, 40 persons. Cottages can be booked by the night; meeting rooms can be booked by the hour. Rates for cottages are expressed per person, per night; rates for meeting rooms are expressed per hour. Clients can book cottages and meeting rooms in advance by providing a phone number and a valid credit card information. Customers can express preferences for specific cottages. Cancellation of reservations is possible but requires 24 hours notice. An administrative charge applies to all cancellations. Every morning, a summary of the bookings for the previous day is printed out and the related information is erased from the computer; a list of the cottages and meeting rooms that will require cleaning is 26-Oct-13 printed.
26-Oct-13
49