Top Banner
Computer Engineering Department Object Oriented Software Modeling and Design CE 350 Abdel-Karim Al-Tamimi, Ph.D. [email protected] http:// faculty.yu.edu.jo/ altamimi Al-Tamimi 2011 © 1
29
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture06

Computer Engineering Department

Computer Engineering Department

Object Oriented Software Modeling and Design

CE 350Abdel-Karim Al-Tamimi, Ph.D.

[email protected]://faculty.yu.edu.jo/

altamimi

Al-Tamimi 2011 © 1

Page 2: Lecture06

Overview

• Door Master Example

Al-Tamimi 2011 © 2

Page 3: Lecture06

Door Master System

• Door Master System: a security system for controlling entry of employees through a secured door

3Al-Tamimi 2011 ©

Page 4: Lecture06

Door Master: Description

• Employees and security guards enter freely through the door when Door Master is disabled. – (Enter Disabled Door)

• Employees and security guards enter through the door by following these steps:1.entering the entry code on the numeric keypad, 2.entering through the door3.closing the door behind them

• The alarm is raised if the door is left open too long or if the door is not shut when Door Master is enabled

– (Enter Secured Door)

Al-Tamimi 2011 © 4

Enter Secured Door

Enter Secured Door

Enter Disabled Door

Enter Disabled Door

Page 5: Lecture06

Door Master: Description

•  Security guards change the entry code by 1. pressing the change entry code button on the

control panel2. providing authorization by entering the

security code on the numeric keypad3. entering the new entry code on the numeric

keypad4. verifying the new entry code by reentering it

on the numeric keypad– (Change Entry Code)

Al-Tamimi 2011 © 5

Change Entry Code

Change Entry Code

Page 6: Lecture06

Door Master: Description

• Security guards change the security code by:1. pressing the change security code button on

the control panel 2. providing authorization by entering the old

security code on the numeric keypad3. entering the new security code on the

numeric keypad4. verifying the new security code by reentering

it on the numeric keypad.– (Change Security Code)

Al-Tamimi 2011 © 6

Change Security Code

Change Security Code

Page 7: Lecture06

Door Master: Description

• Security guards enable Door Master by:1. pressing the enable button on the control panel2. providing authorization by entering the security

code on the numeric keypad. Door master3. turns off the disabled light 4. turns on the enabled light5. locks the door

• The alarm is raised if the door is left open too long or if the door is not shut when Door Master is enabled

– (Enable Door Master)

Al-Tamimi 2011 © 7

Enable Door Master

Enable Door Master

Page 8: Lecture06

Door Master: Description

• Security guards disable Door Master by 1. pressing the disable button on the control

panel2. providing authorization by entering the

security code on the numeric keypad– Door master then

1. turns off the enabled light2. turns on the disabled light3. unlocks the door

– (Disable Door Master)

Al-Tamimi 2011 © 8

Disable Door Master

Disable Door Master

Page 9: Lecture06

Door Master: Initial Use-Case Diagram

Al-Tamimi 2011 © 9

Page 10: Lecture06

Door Master: Refining Use-Cases

• These two use cases are common among the use cases and thus can be considered as abstract include use-cases– Employees and security guards enter the entry code by

pressing five keys on the numeric keypad followed by the enter key. Door master beeps after each key and verifies the entry code. (Enter Entry Code) common in (Enter Secure Door, Change Entry Code)

– Employees and security guards enter the entry code by pressing seven keys on the numeric keypad followed by the enter key. Door master beeps after each key and verifies the entry code. (Enter Security Code) common in (Change Entry Code, Change Security Code, Enable Door Master, Disable Door Master)

Al-Tamimi 2011 © 10

Enter Entry Code

Enter Entry Code

Enter Security Code

Enter Security Code

<<include>> <<include>>

Page 11: Lecture06

Door Master: Refined Use-Case Diagram

Al-Tamimi 2011 © 11

Page 12: Lecture06

Door Master: Refining Use-Case Diagram

• The following abstract use case extends the use cases– The alarm is raised if the door is left

open too long or if the door is not shut when Door Master is enabled. The security guards disable the alarm by entering the security code.

– (Raise Alarm) extends (Enable Door Master) and (Enter Secured Door) 

Al-Tamimi 2011 © 12

Raise AlarmRaise Alarm<<Extend>>

Page 13: Lecture06

Door Master: Refined Use-Case Diagram

Al-Tamimi 2011 © 13

Page 14: Lecture06

Course Registration System

Use Case Example

Al-Tamimi 2011 © 14

Page 15: Lecture06

Course Registration System: Description

• At the start of each semester a student can request a course list. Information about a course is provided, such as the tutor (instructor), department and pre-requisites.

• The new system will allow the students to create a schedule, then select four courses.

• Each student can choose two other courses in case their first choices become full or cancelled

Al-Tamimi 2011 © 15

Page 16: Lecture06

Course Registration System: Description

• No course can have more than 10 students

• No course can have less than 3 students or it will be cancelled

• These functionalities will be available to other users of the system

• When registration is complete, the registration system sends a message to the billing system to send out a bill to the student

Al-Tamimi 2011 © 16

Page 17: Lecture06

Course Registration System: Description

• Tutors use the system to find which classes they are teaching and who are the students in the class

• The registrar will administer the system• For a period of time at the beginning of

the semester, the students can change their schedule. Students must be allowed to access the system during the this time to add or delete courses

Al-Tamimi 2011 © 17

Page 18: Lecture06

CRS : Actors

• Actors:– Student– Tutor– Billing System– Registrar

Al-Tamimi 2011 © 18

Page 19: Lecture06

CRS: Use-Cases/Goals

• Student:– View Course List– Register for Courses and pay the semester bill

• Tutor– View Teaching Courses

• Registrar– Maintain course information– Maintain student information– Maintain tutor information– Maintain curriculum – Generates course lists

Al-Tamimi 2011 © 19

Page 20: Lecture06

CRS: Initial Use-Case Diagram

Al-Tamimi 2011 © 20

Page 21: Lecture06

Documenting Use-CasesInformal Style

• Use case: Register Courses• Brief Description: The student

initiates the use case to create, read, update or delete a course for the coming semester

• Primary flow of events: – The student initiates the use case by

entering a student number

Al-Tamimi 2011 © 21

Page 22: Lecture06

Documenting Use-CasesInformal Style

• Primary flow of events(cont):– The system validates the student number and

prompts the student for the preferred activity• Create a schedule • Review the schedule • Change the schedule by adding or deleting a

course

– The student indicates when finished– A schedule is printed– The system sends details to the Billing System

Al-Tamimi 2011 © 22

Page 23: Lecture06

Documenting Use-CasesInformal Style

• Alternative flow of events:– If the student enters an invalid number,

the student is denied access with an error message

– If a schedule already exists and a new one is created, the student will be informed and asked for another option

Al-Tamimi 2011 © 23

Page 24: Lecture06

Documenting Use-CasesFormal Style

• We will add the following sections:– Primary and secondary actors – Pre-conditions –Minimum guarantees – Success guarantees/Post-Conditions

Al-Tamimi 2011 © 24

Page 25: Lecture06

Documenting Use-CasesFormal Style

Al-Tamimi 2011 © 25

Use case name

Register Courses

Use case ID UC-100

Super use case

-

Actor(s) Primary Actor(s): StudentSecondary Actor(s): Billing System

Brief description

The student initiates the use case to create, read, update or delete a course for the coming semester

Preconditions Registrations for the Semester are open to Students.

Post-conditions

A Schedule has been created/updated for a Student.

Page 26: Lecture06

Documenting Use-CasesFormal Style

Al-Tamimi 2011 © 26

Flow of events 1.The Student initiates the use case by entering a student number and password2.The System prompts the student for one of the following options: • Create a schedule • Review a schedule • Change a schedule (to add or delete a course offering) 3. The Student selects an option, completes the task and indicates when finished 4. The System saves any changes made, sends billing details to the Billing System and prints the schedule5. The use case ends

Page 27: Lecture06

Documenting Use-CasesFormal Style

Al-Tamimi 2011 © 27

Alternative flows and exceptions

1a: Invalid Student Details Entered 1. The System denies access and displays an error message 2. The use case resumes at step 1 (of Primary flow) Continued on next slide

Priority High

Non-behavioral requirements

The system should be able to handle at least 10,000 students concurrently

Assumptions

Issues Refer to UI Specification xxx for the user interface associated with this use case

Source User Interview Memo 21, 8/9/01

Page 28: Lecture06

Documenting Use-CasesFormal Style

Al-Tamimi 2011 © 28

Alternative flows and exceptions

2: Student Selects to Create a Schedule 1. The System checks that the Student does not already have a Schedule for the upcoming semester. 2. The Student selects 4 primary course offerings, 2 alternative course offerings and submits their selections. 3. The System checks that the prerequisites are satisfied and adds the Student to the course offerings. 4. The System generates charges associated with the selections made. 5. The use case resumes at step 4 (of Primary flow).3: Student has an existing Schedule IRM Training - White Paper 1. The System displays an error stating the Student already has an existing Schedule and cannot create a new one. 2. The use case resumes at step 2 (of Primary flow).

Page 29: Lecture06

Resources

• http://www.irm.com.au/papers/How_to_use_Use_Cases.PDF

Al-Tamimi 2011 © 29