1 A Student Guide to Object- Oriented Development Chapter 6 Identifying Functionality.

Slides:



Advertisements
Similar presentations
Use-Cases.
Advertisements

Data Flow Diagramming Rules Processes –a process must have at least one input –a process must have at least one output –a process name (except for the.
Use Case & Use Case Diagram
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Actors and use cases Use-case diagram Brief notation Prioritization Fully dressed notation Requirements Functional requirements  Use-cases.
Robert B. Jackson Brigham Young University John W. Satzinger
A Student Guide to Object-Oriented Development
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Interaction Diagrams Activity Diagram State Machine Diagram
Introduction To System Analysis and Design
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
Lecture 4 Class Responsibility Collaboration Cards
Use Case Modelling.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Interaction Diagrams.
Object Collaborations. Objectives: Object Interaction (cont.) You will be able to:  Use sequence diagrams to detail object interactions.
Slide 7B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
A Student Guide to Object- Orientated Development Chapter 2 Requirements for the Wheels case study system.
Thredz Thredz is a successful costume hire business. Its customers range from theatre companies, who hire large numbers of outfits for periods of several.
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
7M822 UML Interaction Diagrams 25 November 2010.
7M822 UML Sequence Diagrams 5 October 2009.
1 Lab Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Chapter 7: The Object-Oriented Approach to Requirements
Hospital Management System OOSD Assignment 1 Object Oriented Analysis Presented by Group 4: Vivek Sachdeva Nesa Simon David Eric.
A Student Guide to Object- Orientated Development
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Requirements Functional requirements  Use-cases
Introduction to Sequence Diagrams
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 21. Review ANALYSIS PHASE (OBJECT ORIENTED DESIGN) Functional Modeling – Use case Diagram Description.
1 CMPT 275 Phase: Design. Janice Regan, Map of design phase DESIGN HIGH LEVEL DESIGN Modularization User Interface Module Interfaces Data Persistance.
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis Activity (Identifying Objects, Scenarios) Janice Regan,
1 Sub-Phase Low Level Design (cont). Janice Regan, Map of design phase DESIGN HIGH LEVEL DESIGN Modularization User Interface Module Interfaces.
Introduction To System Analysis and Design
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
1 CMPT 275 Software Engineering Requirements Gathering Activity Janice Regan,
Review ♦ System sequence diagram ♦ Domain model
THE CLASS DIAGRAM Pertemuan 10 Matakuliah: Konsep object-oriented Tahun: 2009.
Payroll System Bank System Any bank(s) to which direct deposit transactions are sent. Employee A person that works for the company that owns and operates.
Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 1 Modelling OO Logic Requirements: Sequence Diagrams and Activity Diagrams (Textbook Chapter 8, Appendix)
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
Coming up: Interaction Diagrams Sequence Diagrams Dan Fleck.
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
A Student Guide to Object- Oriented Development Chapter 10 Designing objects and classes.
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
(c) Addison Wesley Copyright © 2000 by Addison Wesley Version 1.0
1 Examining Execution Sequences Introducing Sequence Diagrams.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Phase 6 Start: Saturday14 April End: Saturday 21 April
Coming up: Interaction Diagrams Sequence Diagrams Dan Fleck.
1 LAB What is Collaboration diagram? 4 Collaboration diagrams illustrate the interaction between the objects, using static spatial structure. 4.
1 SEQUENCE DIAGRAM EXAMPLE The domain model, showing the navigability of the associations, and the Reserve video (staff scenario) use-case description.
Understanding Requirements
USE CASE Pertemuan 7 Matakuliah: Konsep object-oriented Tahun: 2009.
UML - Development Process 1 Software Development Process Using UML.
Use Case Model Use case description.
CSC 480 Software Engineering PSP Project 2 August 27, 2004.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
Chapter 5 유스케이스 개요 Introduction to Use Cases
Object-Oriented Analysis
Chapter 11 Following the Trail; Examining Execution Sequences
CRC Modeling (class-relationship-collaborator)
Software Design Lecture : 15.
Chapter 4 Sequence Diagrams
Presentation transcript:

1 A Student Guide to Object- Oriented Development Chapter 6 Identifying Functionality

2 Class-Responsibility- Collaboration (CRC) cards useful for identifying operations not officially part of the UML views classes in terms of their responsibilities responsibilities evolve into sets of operations Identifying operations using the CRC card technique

3 Responsibilities Overall system functionality divided up between classes Each class has certain responsibilities to provide a service to a user (e.g.maintain a customer record) or to another class (e.g. to supply data)

4 CRC cards Responsibilities are allocated to the most appropriate class Sometimes a class needs to collaborate with another class to fulfil its responsibilities

5 CRC card for the Customer class

6 Identifying responsibilities from scenarios  Stephanie arrives at the shop at 9.00am one Saturday and chooses a mountain bike  Annie sees that its number is 468  Annie enters this number into the system  The system confirms that this is a woman’s mountain bike and displays the daily rate (£2) and the deposit (£60) (:Bike)  Stephanie says she wants to hire the bike for a week  Annie enters this and the system displays the total cost £14 + £60 = £74 (:Bike)  Stephanie agrees this  Annie enters Stephanie’s name, address and telephone number into the system (:Customer)  Stephanie pays the £74  Annie records this on the system and the system prints out a receipt (:Payment collaborating with :Customer)  Stephanie agrees to bring the bike back by 5.00pm on the following Saturday

7 Collaboration of objects A collaboration is the group of objects that interact to execute a use case

John : Student registration form schedule formavailable classes 1: enter id 2: validate id 3: enter current semester 4: create new schedule 5: display 6: get courses.Sample Collaboration Diagram.

John : Student registration form available courses schedule form 1: enter id 2: validate id 3: enter current semester 4: create new schedule 5: display 6: get courses Sample Sequence Diagram

10 CRC card for the Hire class

11 CRC card for the Bike class

12 CRC card for the Payment class

13 We need to specify responsibilities in terms of individual operations and attributes. Ensure that each class has data and operations to fulfil responsibility Walk through use case description Deriving operations from responsibilities

14 Use case description: Issue bike

15 Operations required for ‘issue bike’ use case

16 Class diagram for Wheels with attributes and operations

17 Interaction Diagrams Describe messaging between objects to achieve use case goal Revisit sequence of events in each scenario View in terms of messages spawned by each event. Two types of interaction diagram: sequence and collaboration

18 Sequence diagrams

19 Sequence diagrams

20 Sequence diagrams

21 Sequence diagrams

22 Sequence diagrams - without returns

Sequence Diagrams Sequence diagrams present the flow of messages between instances in time. §One can immediately see in what order messages are sent because time is an explicit, vertical dimension on the sequence diagram l each instance is represented as a vertical line

Collaboration Diagrams Collaboration diagrams show how objects work with each other by sending messages and exchanging data. §Sequence diagrams and collaboration diagrams are two different views of object interactions

25 Collaboration Diagrams

26 Data dictionary - operations findBike(bike#) This operation finds the Bike object whose number corresponds to the bike number input (bike#) and returns details about the bike (bike# + available + type + make + model + size + dailyHireRate + deposit)

27 Another example - calcDaysOverdue() calcDaysOverdue() This operation uses today's date from the system clock and the attributes startDate and numberDays to calculate whether the bike has been returned late and if so by how many days. It calculates the overdue amount (Bike.dailyHireRate multipled by the number of days late) and records it by executing SetLatenessDeduction(amt).

28 specification by contract - describes operations in terms of the services they deliver the signature of the operation (its name, any arguments, and the type of values it returns) calcDaysOverdue ( ) the purpose of the operationthis operation works out whether a bike has been returned late and if so by how many days what the client object must provide in order to obtain the required service the bike must have been returned by the customer, the hire details must have been found, a description of the internal logic of the operation the number of days’ hired is added to the start date and then compared with today’s date to calculate if the bike is late and by how many days. The daily hire rate is multiplied by the number of days late to give the charge for late return, this is performed by the Bike.getCharges operation any other operations that are called by this operation this operation calls Bike.getCharges(noDaysLate) any attributes of objects whose values are changed by the operation this operation sets the Hire attributes dateReturned and latenessDeduction