Glenn David Blank Computer Science & Engineering Department Lehigh University, Bethlehem, PA, USA With support from the National Science Foundation (Grants.

Slides:



Advertisements
Similar presentations
Context Diagram Yong Choi BPA CSUB.
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.
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-Cases.
2.7.1.G1 © Family Economics & Financial Education – December 2005– Get Ready to Take Charge of Your Finances – Electronic Banking Bonanza – Slide 1 Funded.
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 – ATM EXAMPLE Actors: ATM Customer ATM Operator Use Cases: The customer can withdraw funds from a checking or savings account query the balance.
Sample Problems for Testing For “Program” Level Testing: –Triangle –Next Date –Sales Commission For “System” Level Testing: –ATM system –Currency conversion.
Lab 10: Bank Account II Transaction List, error checking & aggregation.
Requirements for Opening a Checking Account
Checking Account & Debit Card Simulation
CPSC 333: Foundations of Software EngineeringJ. Denzinger Small Test: Bank account manager System has to run on an automated teller machine. User must.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Assignment I, part 1. Groups of three students. Specify one as group leader. group names to TA and me. Create an object-oriented conceptualization.
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.
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.
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.
Fall 2002 SJSU -- CmpE Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
Object Oriented Analysis Process
Aspect-Oriented Software Development (236601) 1 Home Assignment (what, where and when)
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
{ How to Use An ATM A simple tutorial to teach how to use ATM Machines.
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.
INTERACTION DIAGRAMS Example Kingdom of Saudi Arabia Ministry of Higher Education Princess Noura bint Abdulrahman University College of Computer & Information.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
How to Make a Domain Model Tutorial
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.
Part 4: Debit Cards Dollars & Sense. What Happens If They Don’t Take Checks? Use a Debit Card! Click Visa Debit Commerical 
NOVEL CURRICULA AND TOOLS FOR JAVA IN CS1 COURSES
From Problem Statement to Design
1 CSC103: Introduction to Computer and Programming Lecture No 13.
2.3 Examples: Ski resort information system
Use Cases 2 ENGR ♯10 Peter Andreae
Merijn Benjamin Christina
Big Java Chapter 12. Software Process - Waterfall Analysis Design Implementation Testing Deployment Does not work well when rigidly applied! established.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 25. Review Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations.
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.
UML basics UML distilled, a brief guide to the standard Modeling language, by Martin Fowler, 2000.
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.
A Tutoring System for Novices Learning Object-Oriented Design Glenn D. Blank Computer Science & Engineering Department Lehigh University, Bethlehem, PA,
Tutorial DFD Cap I. Najwa AlGhamdi. context diagram  Why context diagram ?  To know Who will interact with system. What's the main input and output.
Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 3. Defining the System 4. Managing Scope 5.
SFWR ENG 3KO4 Software Development for Computer/Electrical Engineering Fall 2009 Instructor: Dr. Kamran Sartipi Software Requirement Specification (SRS)
Managing Your Money with a Checking Account
Chapter 9 Applying UML and Patterns -Craig Larman
Lesson 8, Unit 3 On Banking This presentation will teach you about banks and credit unions—how they work and why they are a good place to keep your money.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
* Do you have a checking account or credit card that you pay for? Do you know how to manage a checking account or credit card? * Please put your responses.
GOALS BUSINESS MATH© Thomson/South-WesternLesson 3.4Slide 1 3.4Check Register Reconciliation Reconcile a bank statement Reconcile and correct a check register.
Information Systems Engineering Activity Diagram 1.
GOALS BUSINESS MATH© Thomson/South-WesternLesson 3.2Slide 1 3.2Electronic Banking Record electronic banking transactions Find account balance when banking.
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.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
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.
Do Now Why do people have checking accounts?. Unit 4: Lesson 13: Checking Accounts Day 1 Objective: identify vocabulary terms related to checking accounts.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
Inf 43: Introduction to Software Engineering May 7, 2016.
1 Case Study and Use Cases for Case Study Lecture # 28.
CMPE 280 Web UI Design and Development August 29 Class Meeting
Exercices & Corrections Week 3
OO Domain Modeling With UML Class Diagrams and CRC Cards
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
OO Domain Modeling With UML Class Diagrams and CRC Cards
Check Writing All About Checks.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Presentation transcript:

Glenn David Blank Computer Science & Engineering Department Lehigh University, Bethlehem, PA, USA With support from the National Science Foundation (Grants No. EIA and ) and the Pennsylvania Infrastructure Technology Alliance Object-oriented design: from problem description to class diagram

From problem description to class diagram (in nine steps) 1. Read the problem description at least twice. Ask questions about anything you don’t understand or needs more explanation. The ATM verifies whether the customer's card number and his her PIN (a number) are correct. If it is, then the customer can check the account balance, deposit cash, and withdraw cash. Checking the balance simply displays the account balance. Depositing asks the customer to enter the amount, then updates the account balance. Withdraw cash asks the customer for the amount to withdraw; if the account has enough cash, the account balance is updated. The ATM prints the customer’s account balance on a receipt.

Sentence grammar analysis 2. Put an ‘S’ next to each subject, a ‘V’ next to each verb and an ‘O’ next to each object. The ATM verifies whether the customer's card number and PIN are correct. S V O O O If it is, then the customer can check the account balance, deposit cash, S V O V O and withdraw cash. Checking the balance displays the account balance. V O S O V O Depositing asks the customer to enter an amount, then updates the balance. S V O V O V O Withdrawing asks the customer for the amount to withdraw; if the account has S V O O V S V enough cash, the balance is updated. The ATM prints the customer’s O S V S V O account balance on a receipt. O O

Analyze subjects and objects The ATM verifies whether the customer's card number and PIN are correct. S V O O O If it is, then the customer can check the account balance, deposit cash, and withdraw cash. S V O V O V O Checking the balance simply displays the account balance. S O V O Depositing asks the customer to enter the amount, then updates the account balance. S V O V O V O Withdraw cash asks the customer for the amount to withdraw; if the account has enough cash, S O V O O V S V O the account balance is updated. The ATM prints the customer’s account balance on a receipt. O V S V O O 3. Analyze each subject and object as follows: Does it represent a person performing an action? Then is an actor, ‘R’. Is it also a verb (such as ‘deposit’)? Then it may be a method, ‘M’. Does a subject take a simple value, such as ‘color’ (string) or ‘money’ (number)? Then it is probably an attribute, ‘A’. Which remaining unmarked noun occurs most frequently? Make it ‘C’ for class. In Eclipse, draw a class for your first class. R R M M A A A A A A A A AA A A AA A M C C RM MMM M R

Analyze methods and attributes 4. If a verb has a non-actor object it’s a method, M 5. Distinguish attributes, A, and parameters, P: If it doesn’t distinguish instances of a class or store information about objects, it’s probably a parameter, not an attribute Add attributes to a class in the UML class diagram Add methods in the class diagram While adding methods, include the parameters See the return type of your methods: “get” methods take the type of the attribute returned “set” methods take “void” return type compute methods take the type of the computed value Methods that answer true/false questions take boolean type

Constructors 6. Design one or more constructors for the class. A constructor creates an instance of a class. A constructor has the same name as the class —e.g., class Person has constructor Person(). A constructor has no return type, but may take parameters —to initialize attributes.

Any more classes? 7. If any remaining class has no attributes, it’s probably an attribute of another class 8. Otherwise, add another class to the diagram and go back to step 4 (analyze its methods and attributes) 9. Draw association links between the classes Check your design to make sure it makes sense!

Lab exercise: Design a movie ticket vending machine The movie ticket machine displays the movie title, displays the show time (e.g. “ :00pm”), and displays the price of a ticket (e.g. 8.50). A customer enters money (e.g ) into the machine. The machine displays the customer’s balance (e.g ). The customer enters the number of tickets (e.g. 1) into the machine. The machine prints the tickets, and returns the customer’s balance (e.g ). Print tickets also tracks the number of available seats in the theater so it can tell the customer when the available seats are sold out.