From Problem Statement to Design

Slides:



Advertisements
Similar presentations
Introduction to Object Orientation System Analysis and Design
Advertisements

GCSE ICT By the end of this session, you will be able to: Explain main features of ATM machines Identify features of credit cards, debit cards, smart cards.
Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
Use Case Diagrams Damian Gordon.
Use Case & Use Case Diagram
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
USE CASE – ATM EXAMPLE Actors: ATM Customer ATM Operator Use Cases: The customer can withdraw funds from a checking or savings account query the balance.
UML and Systems Analysis MIS3502: Application Integration and Evaluation David Schuff
Ch 12: Object-Oriented Analysis
Lecture 8 Electronic Commerce Modelling Techniques
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
CS3773 Software Engineering Lecture 03 UML Use Cases.
Chapter 12 ATM Case Study, Part 1: Object-Oriented Design with the UML
Interaction Diagrams Activity Diagram State Machine Diagram
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Object Oriented Analysis Process
Copyright W. Howden1 Lecture 2: Elaboration Tasks and Domain Modeling.
UFCEPM-15-M Object-oriented Design and Programming Jin Sa.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
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.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
Object-oriented Design CSCI 5801: Software Engineering.
Use Cases 2 ENGR ♯10 Peter Andreae
UML and Systems Analysis
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis Activity (Identifying Objects, Scenarios) Janice Regan,
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of.
Faculty of Computer & Information Software Engineering Third year
UML basics UML distilled, a brief guide to the standard Modeling language, by Martin Fowler, 2000.
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
SFWR ENG 3KO4 Software Development for Computer/Electrical Engineering Fall 2009 Instructor: Dr. Kamran Sartipi Software Requirement Specification (SRS)
Faculty of Computer & Information
Behavioral Modeling: Sequence and Communication Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
Use Cases -Use Case Diagram Chapter 3 1. Where are we? 2 Analysis Chapters Ch 2Investigating System Requirements Ch 3Use Cases Ch 4Domain Modeling Ch.
January Ron McFadyen1 January 2004 Assignment 1 Due: Friday Jan 23, Implement the ProductSpecification and Payment classes in any OO.
ATM Adv. SW Engineering
Chapter 13 ATM Case Study Part 2: Implementing an Object-Oriented Design Java How to Program, 8/e (C) 2010 Pearson Education, Inc. All rights reserved.
Requirements specification Why is this the first major stage of software development? –Need to understand what customer wants first Goal of requirements.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
1 Requirements Engineering From System Goals to UML Models to Software Specifications Axel Van Lamsweerde.
UML (Unified Modeling Language)
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Identification of Classes. Object Oriented Analysis (OOA) OOA is process by which we identify classes that play role in achieving system goals & requirements.
Lecture Outline Monday 23 rd February (Week 4) 3 – 3:10pm Review of Requirements Eng. and use cases 3:10 – 3:40pm Exercise on Use Case 3:40-4:40 Class.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
Chapter 3: Software Design –Use case Diagram Nouf Alghanmi.
CHAPTER 6 OBJECT ANALYSIS.
1 Object-Oriented Static Modeling of the Banking System - III Lecture # 33.
Inf 43: Introduction to Software Engineering May 7, 2016.
1 Case Study and Use Cases for Case Study Lecture # 28.
Use Cases -Use Case Diagram
CMPE 280 Web UI Design and Development August 29 Class Meeting
Use Case Modeling - II Lecture # 27.
ATM OO Design and Implementation Case Study
Dynamic Modeling of Banking System Case Study - I
Object-Oriented Static Modeling of the Banking System - I
Exercices & Corrections Week 3
UML Use Case Diagrams.
OO Domain Modeling With UML Class Diagrams and CRC Cards
OO Domain Modeling With UML Class Diagrams and CRC Cards
Object-Oriented Analysis
Use Cases & Use Case Diagrams
Software Design Lecture : 15.
Software Design Lecture : 14.
Copyright 2007 Oxford Consulting, Ltd
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Presentation transcript:

From Problem Statement to Design The Object Modeling Process MIS 83 Notes

References Sources for some of the material in this section: Beginning Java Objects, Jacquie Barker, Wrox Press, Ltd. 2000 ISBN 1861004176 Object-Oriented Systems Analysis, Modeling the World in Data, Sally Shlaer, Stephen Mellor, Yourdon Press, 1988 ISBN 013629023-X An Example of Object Oriented Design, An ATM Simulation, Russell Bjork, (Website) http://www.math-cs.gordon.edu/local/courses/cs320/ATM_Example/default.html

The Process Narrative Problem Statement Class Identification Class Relationships Class behavior (e.g. Public methods required)

Narrative Problem Statement Potential Sources Forms, reports Engineering drawings Real world object specifications Interviews

Bjork's ATM Example

ATM Narrative (Partial) from Bjork's website Services one customer at a time Must be able to handle 10 customers an hour Customer inserts ATM card and enters PIN to begin Transactions Cash withdrawals --- in $20 increments Deposits Transfers Balance inquiries Immediate transaction validation with the bank Standard error procedures Pin error, rejection due to inadequate balance Reports

Narrative Problem Statement - Use Cases A use case is a logical sequence of events from the users first interaction, to the desired outcome. For each use scenario, and each user (actor) . . . a use case describes The services the system provides to the user The sequence of events The desired outcome Users of systems can be people organizations other systems

Some Use Cases for the ATM From the Bjork website: System startup . . . User: System operator Services: Load cash dispenser, start ATM Cash withdrawal . . . User: Customer Services: Choose type of account, choose dollar amt, Validate withdrawal with Bank "The system is started when the operator turns the switch on the panel to 'on'. The operator will be asked to enter the amount of money in the cash dispenser . . . "

Object Classes Are . . . Tangible Things Roles Airplane, ATM, person Roles Professor, student Incidents and interactions Purchase, withdrawal, flight Specifications Aircraft characteristics: Weight, wingspan, max speed Notice that many objects are not physical. (e.g. transactions, like a purchase, are not physical)

Use the requirements statement and use Identifying Potential Object Classes -- Exercise -- (Steps from the Barker text) Use the requirements statement and use cases to develop a list of objects. Identify noun-phrases (nouns and related adjectives) in the narrative descriptions Eliminate duplicates (including plurals of items in the list) Eliminate state information (e.g. terms like "completion") Eliminate synonyms Assure that the classes are abstractions that a user would recognize (Not implementation tools) Determine whether actors not in the class list should be. Check to see if other actors need their services.

Naming Objects Avoid roles or states in the names (e.g. ATM dispensing cash)

Testing Potential Classes Objects instantiated from the classes must have the same set of attributes . . . Dog licenses and vehicle licenses cannot be in the same class However, they can both be derived from the same class Objects must have attributes Social security number is not a class, it is only a name Social security account is a class "Or" must be avoided in defining the class The objects formed from a class must be more than a list . . . The class must be definable

Exercise Continued Test the classes you created Are any actors mentioned in the use cases, not included as classes? Review: Bjork's class list. Do you agree with the list? (Do the classes pass the tests?)

Static Class Relationships Static relationships Inheritance: Class a is derived from class b Association, e.g. President runs an airline There are many students in one University There may be many Universities associated with one student. Aggregation (Special case of association): class a "is comprised of" Class b, e.g. A building has rooms A course has 5 sections Associations and aggregations are coded the same way.

Static Class Relationships in the Unified Modeling Language (UML) Inheritance Aggregation University Animal School Dog Cat

Static Class Relationships in the Unified Modeling Language (UML) - Continued Associations Section * 1 Professor * * Course 1 * Association relationships possible: 1 * --- One to many * * --- Many to many 1 1 --- One to one What are the specific associations in this example?

Static Class Relationships in the Unified Modeling Language (UML) - Continued Inheritance and Associations in the same diagram Person Section * 1 Professor * * Course 1 *

Exercise --- continued Consider the following list of ATM classes Are there any inheritance relationships? Do any classes contain other classes? Are there any other associations --- what are they? ATM Bank Card Reader Session Keyboard Transaction Display Withdrawal Cash Dispenser Envelope Acceptor Operator Panel Deposit Transfer Inquiry Draw a UML representation of the relationships. Review: Bjork's UML definition.

Completing the Static Class Definitions Determine and define attributes of each class Give an example of a field belonging to the cash dispenser. Review: Bjork's field definitions

Dynamic class behavior (public methods) State of an object --- Values of all attributes at a specific time Methods --- Respond to events Handle requests from other objects Send requests to other objects by calling their methods May return values --- Accessor methods (i.e. have a non-void return value) May modify state of an object --- Mutator methods (i.e. may have a void return value)

A first step in establishing public methods Start with a use case or state diagram Construct a sequence of steps required of objects to complete the sequence of events associated with each use case. For each step Service description Object requesting the service (client) Object fulfilling the service Next object (or objects) involved in completing the sequence Identify methods for each object to perform the services.

Sequence of Steps for a Withdrawal Withdrawal transaction ATM --> Card Reader checkForCardInserted() ATM --> Session startSession() Session --> Keyboard readPin() Session --> Keyboard readMenuChoice() Session --> WithDrawalTransaction getTransactionSpecifics() WithDrawalTransaction --> Bank initiateWithdrawal (cardNumber,PIN,ATM number, serial, from, amount) Some of these steps require instantiation of new objects by adding them to vectors . . . others do not. What is an example of this? Following the state diagram for a session, what's next?

Next step: From model to program . . . Inheritance relationships coded as extends Relationships 1:1 becomes instantiation of the related class 1:* becomes instantiation of a Vector or array containing the related class Public Methods are determined from each sequence of steps for major uses. The methods are associated with specific classes. Additional implementation classes GUI design and classes Data base and other technology-related classes