Simple Address Book Case Study Lecture 4 UML Huma Ayub Department of Software Engineering.

Slides:



Advertisements
Similar presentations
User Training. Step 1 Press Ctrl-I or choose File > Login, this will open the Login window. Figure 1-1 shows the Login window. Figure 1-1 Login Window.
Advertisements

 Copyright I/O International, 2013 Visit us at: A Feature Within from Sales Rep User Friendly Maintenance – with Zip Code.
Case Study Lecture 4 UML Huma Ayub Department of Software Engineering
CPIT 102 CPIT 102 CHAPTER 1 COLLABORATING on DOCUMENTS.
XP New Perspectives on Creating Web Pages With Excel Tutorial 1 1 Creating Web Pages With Excel Tutorial 1.
Library Online Catalog Tutorial Pentagon Library Last Updated March 2008.
Lab6 – Debug Assembly Language Lab
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
BA271 Week 6 Lecture Database Overview Dave Sullivan.
Automating Tasks With Macros
Slide 6B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Microsoft Access 2003 Introduction To Microsoft Access 2003.
Java Tutorial – Building GUIs Java with Added Swing Daniel Bryant
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 1 1 Microsoft Access 2003 Tutorial 1 – Introduction To Microsoft Access 2003.
E | W | E | W | NHS e-Referral Service Referring Roles Issued: 3 June.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 3 Maintaining a Database Using the Design and Update Features of Access.
Management Information Systems MS Access 2003 By: Mr. Imdadullah Lecturer, Department of M.I.S. College of Business Administration, KSU.
Creating Web Page Forms
More Arrays Length, constants, and arrays of arrays By Greg Butler.
Lesson 4: Using the Calendar
User Friendly Vendor Maintenance A Family of Enhancements For iSeries 400 DMAS from  Copyright I/O International, 2010, 2011 Skip Intro Exit.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Chapter 2 (Horstmann’s Book) – Part 2 The Object-Oriented Design Process Hwajung Lee.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
XP New Perspectives on Microsoft Access 2002 Tutorial 41 Microsoft Access 2002 Tutorial 4 – Creating Forms and Reports.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 12 1 Microsoft Office Access 2003 Tutorial 12 – Managing and Securing a Database.
Introduction to the WebBoard Terry Dennis. The WebBoard - Our Connection The WebBoard URL is
PMS /134/182 HEX 0886B6 PMS /39/80 HEX 5E2750 PMS /168/180 HEX 00A8B4 PMS /190/40 HEX 66CC33 By Adrian Gardener Date 9 July 2012.
Risk Assessment/Risk Reduction © Risk Assessment/Risk Reduction Risk Assessment Risk Reduction Software.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Introduction to Microsoft Access 2003 Mr. A. Craig Dixon CIS 100: Introduction to Computers Spring 2006.
1 CMPT 275 Phase: Design. Janice Regan, Map of design phase DESIGN HIGH LEVEL DESIGN Modularization User Interface Module Interfaces Data Persistance.
1 Working with MS SQL Server Textbook Chapter 14.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with MSSQL Server Code:G0-C# Version: 1.0 Author: Pham Trung Hai CTD.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
1 The EDIT Program The Edit program is a full screen text editor that allows you to: Create text files Create text files Edit an existing text files Edit.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
XP New Perspectives on Microsoft Access 2002 Tutorial 1 1 Microsoft Access 2002 Tutorial 1 – Introduction To Microsoft Access 2002.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
SESSION 3.1 This section covers using the query window in design view to create a query and sorting & filtering data while in a datasheet view. Microsoft.
REQUIREMENTS CAPTURE 1 ASU Course Registration System Use-case Model.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
BA271 Week 6 Lecture Dave Sullivan. Goal for today… Status Report – Review where we are … Status Report – Review where we are … Begin learning about Microsoft.
An Introduction to Forms. The Major Steps of a MicroSoft Access Database  Tables  Queries  Forms  Macros  Reports  Modules On our road map, we are.
Securing and Sharing Workbooks Lesson 11. The Review Tab Microsoft Excel provides several layers of security and protection that enable you to control.
Shelcat Scottish Health Libraries Catalogue Training guide, March 2009.
NSF DUE ; Wen M. Andrews J. Sargeant Reynolds Community College Richmond, Virginia.
PestPac Software. Leads The Leads Module allows you to track all of your pending sales for your company from the first contact to the close. By the end.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
Chapter – 8 Software Tools.
Navigation: If the tutorial opens up in your web browser, simply click your mouse to advance to the next slide. Use the “Backspace”
Copyright  Oracle Corporation, All rights reserved. 1 CMIS Powell Oracle Designer: Process Modeling CMIS Powell.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Course Contents Overview: Database basics Lesson 1: Benefits of using a database Lesson 2: Table that data Lesson 3: Analyzing, viewing, and reporting.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Lesson 17 Mail Merge. Overview Create a main document. Create a data source. Insert merge fields into a main document. Perform a mail merge. Use data.
Working in the Forms Developer Environment
Maintaining a Database Using the Design and Update Features of Access
Risk Assessment Risk Reduction Software
Address Book Example
NextGen Purchasing Calendar Year End 1099 Process
Topics Introduction to File Input and Output
Lesson Seven: Maintaining Patient Lists
Microsoft Office Access 2003
Lesson Seven: Maintaining Patient Lists
Aleph Beginning Circulation
Topics Introduction to File Input and Output
Presentation transcript:

Simple Address Book Case Study Lecture 4 UML Huma Ayub Department of Software Engineering

Requirements and User Interface Software to be designed is a program that can be used to maintain an address book. An address book holds a collection of entries, each recording a person's first and last names, address, city, state, zip, and phone number.

Requirements Features Add a new person to an address book Edit existing information about a person (except the person's name) Delete a person Sort the entries in the address book alphabetically by last name (with ties broken by first name if necessary) ZIP code (with ties broken by name if necessary). print out all the entries in the address book in "mailing label" format.

Requirements It must be possible to create a new address book To open a disk file containing an existing address book To close an address book and to save an address book to a disk file Using standard New, Open, Close, Save and Save As... File menu options. The program's File menu will also have a Quit option to allow closing all open address books and terminating the program.

Requirements The initial requirements call for the program to only be able to work with a single address book at a time; therefore, if the user chooses the New or Open menu option, any current address book will be closed before creating/opening a new one. A later extension might allow for multiple address books to be open, each with its own window which can be closed separately, with closing the last open window resulting in terminating the program. In this case, New and Open will result in creating a new window, without affecting the current window.

Requirements The program will keep track of whether any changes have been made to an address book since it was last saved, and will offer the user the opportunity to save changes when an address book is closed either explicitly or as a result of choosing to create/open another or to quit the program

Requirements The program will keep track of the file that the current address book was read from or most recently saved to Will display the file's name as the title of the main window, and will use that file when executing the Save option. When a New address book is initially created, its window will be titled "Untitled", and a Save operation will be converted to Save As... - i.e. the user will be required to specify a file.

User Interface

Use Cases for a Simple Address Book

Analysis

An initial reading of the use cases suggests that the following will be part of the system. A single entity object representing the current address book that the program is working with (AddressBook). An arbitrary number of entity objects, each representing one of the people that is in the current address book (Person). A boundary object representing the interface between the address book system and the human user (AddressBookGUI). A boundary object representing the interface between the address book system and the file system on disk (FileSystem). A controller object that carries out the use cases in response to user gestures on the GUI (AddressBookController).

DESIGN (CRC Card)

CRC CARD Definition: A class represents a collection of similar objects, a responsibility is something that a class knows or does, and a collaborator is another class that a class interacts with to fulfill its responsibilities

Design Sequence Diagram

Flows of Events for Individual Use Cases

Edit a Person Use Case Sequence Diagram

Delete a Person Use Case Sequence Diagram

Sort Entries By Name Use Case Sequence Diagram

Sort Entries By Zip Use Case Sequence Diagram

Open Existing Address Book Use Case Sequence Diagram

Design (Class Diagram)

Classes AddressBookApplication - main class for the application; responsible for creating the FileSystem and GUI objects and starting up the application. MultiInputPane - a utility class for reading multiple values at a single time. Person.CompareByName - Comparator for comparing two Person objects by name (used for sorting by name). Person.CompareByZip - Comparator for comparing two Person objects by zip (used for sorting by name).

Relationship The following relationships hold between the objects: The main application object is responsible for creating a single file system object and a single controller object. The file system object is responsible for saving and re-loading address books The controller object is responsible for creating a single GUI object. The controller object is responsible for initially creating an address book object, but the GUI is henceforth responsible for keeping track of its current address book - of which it only has one at any time. The GUI object and the address object are related by an observer- observable relationship, so that changes to the address book content lead to corresponding changes in the display The address book object is responsible for creating and keeping track of person objects, of which there can be many in any given address book. A MultiInputPane object is used by the controller to allow the user to enter multiple items of data about a person. A comparator object of the appropriate kind is used by the address book object when sorting itself.

CLASS Diagram

Detailed Design and Implementation Detailed Class Design

Class AddressBook

Class AddressBookApplication

AddressBookGUI

Class FileSystem

Person

Code for Simple Address Book Example /* * AddressBookApplication.java * * Main program for address book application * * Copyright (c) 2001, 2003, Russell C. Bjork * */ import java.awt.Frame; import java.awt.event.WindowEvent; // The next line is only needed on the Mac platform - comment out // if compiling on some other platform (but comment back in and recompile // before moving final version to server) import com.apple.eawt.*; /** Main class for the Address Book example */ }

Code for Simple Address Book Example public class AddressBookApplication { /** Main method for program */ public static void main(String [] args) { FileSystem fileSystem = new FileSystem(); AddressBookController controller = new AddressBookController(fileSystem); AddressBookGUI gui = new AddressBookGUI(controller, new AddressBook()); gui.show(); // Register a Mac quit handler - comment out if compiling on some // other platform (but comment back in and recompile // before moving final version to server) com.apple.eawt.Application application = com.apple.eawt.Application.getApplication(); application.addApplicationListener(new ApplicationAdapter() { public void handleQuit(ApplicationEvent e) { e.setHandled(false); quitApplication(); } });

Code for Simple Address Book Example /** Terminate the application (unless cancelled by the user) */ public static void quitApplication() { // When the user requests to quit the application, any open // windows must be closed Frame [] openWindows = Frame.getFrames(); for (int i = 0; i < openWindows.length; i ++) { // Attempt to close any window that belongs to this program if (openWindows[i] instanceof AddressBookGUI) { openWindows[i].dispatchEvent(new WindowEvent( openWindows[i],

Code for Simple Address Book Example WindowEvent.WINDOW_CLOSING)); // If the window is still showing, this means that this attempt // to close the window was cancelled by the user - so abort the // quit operation if (openWindows[i].isShowing()) return; } // If we get here, all open windows have been successfully closed // (i.e. the user has not cancelled an offer to save any of them). // Thus, the application can terminate. System.exit(0); }

Testing

Maintenance

Maintenance The Print Entries Use Case currently sends printed output to System.out. Alternately, it could send its output to a file, chosen by the user in response to a file dialog. It was noted in the orginal requirements that the program might be modified to allow multiple address books to be open at the same time - each in its own window. This might entail the following changes:

Maintenance The Create New Address Book and Open Existing Address Book Use Cases would no longer close the current address book. Instead, they would create a new copy of the GUI, with its own address book (either a newly created, empty one, or one read from a file specified by the user.) There would thus be two (or more) windows visible on the screen. A new Close Address Book Use Case would be added to allow the user to close a single window (and its associated address book). This could be initiated by a new Close option in the File menu, or by clicking the close box for the window. It would offer to save changes, if necessary, and then close the window. If the window that is closed is the last open window in the program, then the program should be terminated as well; otherwise, the program would continue running with the remaining window(s) visible.

Maintenance The code that is activated when the close box for the window is clicked would be the Close Address Book Use Case described above, instead of the Quit Program Use Case. The Quit Program Use Case (activated from the Quit item in the File menu) would need to cause all open windows to be closed, with appropriate offers to save changes, unless the user cancels the operation for any window. If the user cancels the save for any window, the entire use case would terminate at once, without attempting to close additional windows.

Maintenance A facility might be created that would allow the user to search for the occurrence of some character string anywhere in the information about a person. For example, searching for the string "Buffalo" might find Boris Buffalo or a person living in Buffalo, NY; searching for the string "0191" might find a person living in ZIP code or a person whose phone number is , etc. This might entail adding two new use cases: Find and Find Again.

Assignment Case Study – Hospital Management System Problem Statement: A system to manage the activities in a hospital: Patients request for appointment for any doctor. The details of the existing patients are retrieved by the system. New patients update their details in the system before they request for appointment with the help of assistant. The assistant confirms the appointment based on the availability of free slots for the respective doctors and the patient is informed.Assistant may cancel the appointment at any time.