1 Classes. 2 Finding classes w Choosing classes is first step in defining essence of problem w If you can recognize an abstraction, you’ve found a candidate.

Slides:



Advertisements
Similar presentations
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.
Advertisements

What Are the Functions of ATM Machines?
Chapter 4: Requirements Engineering
From use cases to classes (in UML). A use case for writing use cases Use case: writing a use case Actors: analyst, client(s) Client identifies and write.
Use Case Diagrams Damian Gordon.
Use Case & Use Case Diagram
ATM Security Requirements & Specification Decomposition Team B: Martijn Christiaan Vasilis Benjamin.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
1.7.2.G1 © Family Economics & Financial Education – Revised February 2008 – Financial Institutions Unit – Electronic Banking Funded by a grant from Take.
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.
SWE 214 (071) Use Case Diagrams Slide 1 Use Case Diagrams Examples.
Sample Problems for Testing For “Program” Level Testing: –Triangle –Next Date –Sales Commission For “System” Level Testing: –ATM system –Currency conversion.
CPSC 333: Foundations of Software EngineeringJ. Denzinger Small Test: Bank account manager System has to run on an automated teller machine. User must.
Ch 12: Object-Oriented Analysis
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
ATM – requirements Team B Tom Hastjarjanto Martijn Nijenhof Ales Sturala Paul van der Ende.
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.
Information System Design IT60105
Lecture 9 Object-Oriented Analysis
Chapter 12 ATM Case Study, Part 1: Object-Oriented Design with the UML
ATM User Interface Design. Requirements A bank customer is able to access his or her account using an automatic teller machine. To be able to use an ATM.
1.7.2.G1 Electronic/Online Banking & Bill Pay Take Charge of Your Finances.
Tutorial 2. What is a UML Use Case Diagram? Use case diagrams model the functionality of a system using actors and use cases. Use cases are services or.
Objects First With Java A Practical Introduction Using BlueJ Designing object-oriented programs How to write code in a way that is easily understandable,
Lecture 4 Class Responsibility Collaboration Cards
Object Oriented Analysis Process
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
{ How to Use An ATM A simple tutorial to teach how to use ATM Machines.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
From Problem Statement to Design
1.7.2.G1 © Family Economics & Financial Education – Revised May 2009 – Financial Institutions Unit – Electronic Banking Funded by a grant from Take Charge.
111 Subsystems CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 7)
Software Life Cycle Requirements and problem analysis. –What exactly is this system supposed to do? Design –How will the system solve the problem? Coding.
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
ICT and Banks Banks use mainframe computers to maintain customer accounts. They store a record of each customer’s withdrawals and deposits. Each bank mainframe.
SFWR ENG 3KO4 Software Development Fall 2009 Instructor: Dr. Kamran Sartipi Software Requirement Specification (SRS) for the Automated Banking Machine.
Object oriented classification Classification is the process of checking to see if an object belongs to a category or a class, is regarded as a basic attribute.
SFWR ENG 3KO4 Software Development for Computer/Electrical Engineering Fall 2009 Instructor: Dr. Kamran Sartipi Software Requirement Specification (SRS)
Rational Requirements Management with Use Cases v5.5 Copyright © Rational Software, all rights reserved 1 Requirements Management with Use Cases.
January Ron McFadyen1 January 2004 Assignment 1 Due: Friday Jan 23, Implement the ProductSpecification and Payment classes in any OO.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
ATM Adv. SW Engineering
GOALS BUSINESS MATH© Thomson/South-WesternLesson 3.2Slide 1 3.2Electronic Banking Record electronic banking transactions Find account balance when banking.
111 Subsystems CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 7)
Learning Intentions Explain what an ATM is and the facilities offered Identify the stages of withdrawing cash from an ATM List the advantages and disadvantages.
1 Requirements Engineering From System Goals to UML Models to Software Specifications Axel Van Lamsweerde.
Checking Account & Debit Card Understanding Checking Accounts and Debit Card Transactions.
Checking & Savings Accounts Economics What is a Checking Account?  Common financial service used by many consumers (a place to keep money)  Funds.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
Identification of Classes. Object Oriented Analysis (OOA) OOA is process by which we identify classes that play role in achieving system goals & requirements.
Bank Reconciliation Chapter 4. PAGE REF #CHAPTER 4: Bank Reconciliation SLIDE # 2 Objectives Reconcile your checking Create bank reconciliation reports.
Requirements Document for the Banking System
1 Object-Oriented Static Modeling of the Banking System - III Lecture # 33.
1 Case Study and Use Cases for Case Study Lecture # 28.
Introduction What would our society be like now if we did not have ATm’s? Not able to access money when we urgently want it. You will have to go to the.
Paul Ammann & Jeff Offutt
Structured Analysis and Design Technique
ATM OO Design and Implementation Case Study
Storyboarding and Game Design SBG, MBG620 Full Sail University
Object-Oriented Static Modeling of the Banking System - I
OO Domain Modeling With UML Class Diagrams and CRC Cards
OO Domain Modeling With UML Class Diagrams and CRC Cards
Concepts, Specifications, and Diagrams
Paul Ammann & Jeff Offutt
Real-Time Structured Analysis and Design Technique (RSTAD)
Uses of Telecommunications & ICT
Presentation transcript:

1 Classes

2 Finding classes w Choosing classes is first step in defining essence of problem w If you can recognize an abstraction, you’ve found a candidate class w If you can formulate a statement of purpose for a candidate class, it’s more likely to be included in the design

3 Finding classes w Carefully read requirements specification or description of design goals w Discuss what the system should do: expected inputs desired responses w Look for noun phrases (nouns, nouns modified by adjectives) in spec

4 Finding Classes w Having identified nouns, change plural nouns to singular form & make preliminary list w 3 categories will emerge from this list: obvious classes obvious nonsense not sure w Your candidate classes will emerge from the first & last categories

5 Example specification An automatic teller machine (ATM) performs various financial transactions (deposits, withdrawals, and balance inquiries) in response to user requests. The user is able to use the machine if the 4-digit PIN code s/he types in to the ATM keypad matches the code embedded in the magnetic strip on his/her card, which is read by the machine. If the user enters an invalid code, an error message is displayed, and the user is given another chance to enter the code correctly; a second incorrect code results in the user’s card being retained by the machine. Once a valid code is entered, the user may access his/her account for transactions. When a balance inquiry is requested, the machine prints the information on a receipt. When a deposit is requested, the machine receives the deposit envelope and the amount specified is added to the user’s account balance. When a withdrawal is requested, the account balance is checked to ensure that sufficient funds are available, and, if so, the machine dispenses cash and the account is debited by the withdrawal amount.

6 Nouns & noun phrases An automatic teller machine (ATM) performs various financial transactions (deposits, withdrawals, and balance inquiries) in response to user requests. The user is able to use the machine if the 4-digit PIN code s/he types in to the ATM keypad matches the code embedded in the magnetic strip on his/her card, which is read by the machine. If the user enters an invalid code, an error message is displayed, and the user is given another chance to enter the code correctly; a second incorrect code results in the user’s card being retained by the machine. Once a valid code is entered, the user may access his/her account for transactions. When a balance inquiry is requested, the machine prints the information on a receipt. When a deposit is requested, the machine receives the deposit envelope and the amount specified is added to the user’s account balance. When a withdrawal is requested, the account balance is checked to ensure that sufficient funds are available, and, if so, the machine dispenses cash and the account is debited by the withdrawal amount.

7 Preliminary List Automatic teller machineATMamount specified financial transactiondepositaccount balance withdrawalbalance inquirysufficient funds user requestusercash machine4-digit PIN codeaccount ATM keypadcodewithdrawal amount magnetic stripcard invalid codeerror message chanceincorrect code valid codeaccount transactioninformation receiptdeposit envelope

8 Initial elimination phase w Distill redundant terms down to the single term that best describes the concept w Eliminate noun phrases that describe things outside the system w Eliminate nouns that are standins for verbs

9 Redundant terms w Automatic teller machine, ATM, machine: ATM w Financial transaction, transaction: Transaction w 4-digit PIN code, code, valid code, invalid code, incorrect code: PINcode w Account balance, sufficient funds: Balance w Withdrawal amount, amount specified: Amount

10 Eliminate terms from outside system w User is not part of the ATM, so can be eliminated w Likewise the deposit envelope, cash, receipt, card, and the card’s magnetic strip are inputs and outputs, not parts of the machine

11 Eliminate verb standins w “Chance” falls into this category - this noun comes from the phrase “… another chance to enter the code …” - it’s really a standin for “enter,” a verb

12 Narrowed list ATMaccount transactionamount specified depositinformation withdrawalbalance balance inquiryPINcode ATM keypaderror message user request

13 Choosing candidate classes w The guidelines on the next several slides provide suggestions for teasing out the classes in a specification w This process should be done in a systematic fashion, but is more art than science w At this stage, it is much better to have too many candidate classes than too few

14 Choosing candidate classes w Model physical objects w Model conceptual entities that form a cohesive abstraction w Model categories of classes as individual, specific classes - don’t try to set up super/subclass relationships at this stage w Model values of attributes, not attributes themselves

15 Model physical objects w ATM is a physical object, representing the machine as a whole w Likewise, the ATM keypad is a physical object

16 Model conceptual entities w “Error message,” “user request” and “information” are terms that suggest communication between the machine and the user w This suggests some sort of Communication class, which can be used to accept requests and convey information w Account is also a cohesive abstraction, as is PINcode

17 Model categories w The most apparent category is Transaction, with subtypes deposit, withdrawal, and balance inquiry w Each subtype, as well as the category itself, can be modelled as a class

18 Model values, not attributes w “Amount specified” is an attribute of transactions deposit and withdrawal w “Balance” is an attribute of account

19 Second revised class list ATMaccount transactiondeposit withdrawalbalance inquiry PINcodeATM keypad communication

20 Recording candidate classes: CRC cards w CRC stands for Class-Responsibility- Collaboration w Create one card for each class w On the front of the card, write the class name w On the back, write a brief description of the purpose of the class w Cards serve as object surrogates - easy to manipulate, arrange, and discard as needed

21 CRC examples Class: Account Purpose: represents bank customer’s account Class: Keypad Purpose: group of keys for user input Class: Transaction Purpose:performs requested financial transaction & updates user’s account

22 Finding abstract classes w Abstract classes spring from set of classes that share useful attribute (implying shared behavior) w Identify abstract superclass candidates by grouping related classes - once group is identified, name superclass to represent it w Should create as many superclasses as possible - reduces duplication of effort

23 Identifying missing classes w Once identified, extending categories can help in finding missing classes w For example, the Communication class, we can identify subclasses Message, which just provides information to the user, and Menu, which provides information and waits for a response

24 Identifying missing classes w Classes may be found by looking at descriptions of existing classes - for example, keypad is described as “a group of keys” - but what is a key? w Classes may be missing because the spec was imprecise - for example, our spec doesn’t mention a display device, but such a device is clearly necessary

25 Classes -ends-