Professional Documents
Culture Documents
Week 2: - Software Development Life Cycle - Use Cases - Lab Project - Lab 1
Week 2: - Software Development Life Cycle - Use Cases - Lab Project - Lab 1
Kate Gregory
Date Week Topic Hand Out Due Back Test
14-Sep-10 1 Administrivia / Overview / What is an Object? /
Motivation, benefits of OO
16-Nov-10 9 Good Design / Modules & Packages / Metrics Lab 5: Critiques lab 4 5%
7-Dec-10 12 Critiques
??? Final Exam Final 40%
Concept Reviews
• What is an object
– a clump of related information
– also related behaviour
• Encapsulation
• Polymorphism
• Reuse
Kate Gregory
S y s te m
P u b lic A tt r ib u t e s
a n d M e th o d s
P r iv a te
A t tr ib u t e s
a n d
m e th o d s
M y O b je c t
Kate Gregory
Software Development
LifeCycle
• Requirements
• Analysis
• Design
• Implementation
• Testing and Acceptance
• Revisions and Enhancements
Kate Gregory
Analysis and Design Matter
• The foundation for your program
• Changing your mind is easy at this stage
• Get it as right as you can
• Record your decisions
• Expect about 25% of total time
– Per phase or stage
• OO A&D slower than procedural
– save that time during later stages
LifeCycle Models
• Waterfall
– what managers believe
• Fountain
– reality
• Recursion
– only really possible with OO
• Agile
– Compatible with OO
Kate Gregory
How to Save Time
• Prototyping
– paper
– disposable
– evolutionary
• Component Based Programming
• Rapid Application Development
• Reuse: ideas, classes, code
Kate Gregory
The Course Project
A client is about to open a campground and needs you to
develop a software system to support operations. In the
future, the client plans to offer reservations and
cancellations from the Internet. You are requested not to
make design decisions that would hamper this expansion.
The specific operations that the client wishes to track include
reservations, rentals, cancellations, charges for day use and
overnight stays, cancellation fees, and reservation fees.
This system will not handle payroll or other non-rental
aspects of the campground.
Kate Gregory
The Course Project
• Work in groups
• Work on the same problem all term
• Build up an analysis and the start of a
design
• Critique a deliberately flawed solution
• 4 labs @ 5%, Critique @ 15%
Kate Gregory
Working in Groups
• Since 1999, students in groups have done
MUCH better than students who work alone
on these labs
• Students report learning a great deal from
their groupmates throughout the term
• Choose wisely
• Group size 3 or 4
– 2 or 5 with my permission
Kate Gregory
Requirements Difficulties
• Incomplete requirements
• Fuzzy descriptions
– fast response
– ten transactions per second
• Unneeded features
Kate Gregory
Use cases help find
requirements
• Capturing use cases is one of the first things
to do in coming up with requirements.
• Every use case holds potential
requirements.
Kate Gregory
What is a use case?
Kate Gregory
Use Cases Capture Sequence
Kate Gregory
Checking into a hotel
• Customer approaches front desk
• Clerk greets customer
• Customer provides name (and company name?)
• Clerk retrieves reservation
• Clerk requests credit card
• Customer provides card
• ...
Kate Gregory
What if?
• No clerk is free when customer arrives?
• Clerk cannot find reservation?
• Reservation is wrong (# guests, dates,
smoking/non-smoking)?
• Customer has no credit card?
• Authorization is declined?
• ...
Kate Gregory
Use Cases Have Names
• Customer Makes Reservation
• Clerk Finds Available Room
• Customer Checks In
• Customer Checks Out
• …
Kate Gregory
Use Case: Customer Checks In
• A: Customer approaches the desk and
speaks to a clerk
• B: Clerk obtains customer’s name and finds
existing reservation
• C: Customer confirms reservation is correct
• D: Customer provides credit card
• …
Kate Gregory
Diversions
• At A, if no clerk is free customer waits until
a clerk is available
• At B, if customer has no reservation, clerk
performs Clerk Finds Available Room
• At C, if reservation on file is incorrect, clerk
performs Clerk Finds Available Room with
corrected values
• …
Kate Gregory
Use Case Key Concepts
• Use case. Each use case is a flow of events
through the system.
• Actors. An actor is independent of the
system and does not need to be modelled.
• Diversion. This refers to a variation from
the expected flow of events.
Kate Gregory
Finding Use Cases
• For each actor, find the tasks and functions
that the actor should be able to perform or
that the system needs the actor to perform.
• Name the use cases. Use the pattern Actor
Verb Something
• Describe the use cases briefly using terms
with which the user is familiar.
• Start with the optimistic or expected
approach then add diversions.
Kate Gregory
Familiar Vocabulary
• Use a vocabulary that your readers
understand and are comfortable with.
• The main objective here is to communicate
with readers, not impress them with buzz
words.
• The longer your documents stay in business
jargon, the longer your users are in the loop.
Kate Gregory
Use Associations
• The use association occurs when you are
describing your use cases and notice that
some of them have common subflows.
• The use association allows you to extract
the common subflow and make it a use case
of its own.
• Example: Clerk Finds Available Room is a
use case of its own that is used in Customer
Checks In as well.
Kate Gregory
Extends Associations
• The extends association is used when you
have one use case that is similar to another
use case but does a bit more or
• Is more specialized; in essence, it is like a
subclass.
• Example: Customer Checks Out Early is a
specialized version of Customer Checks
Out.
Kate Gregory
Use Case Diagram
Library
Kate Gregory
Not User Interface Design
• Business objects like Reservation or Inventory
are typically in a business layer
• Objects in a user interface are often form or
window with button and text box – designed
by a framework author
• In this course we’re focusing on the business
layer
• Use cases are also helpful in UI design
Kate Gregory
Lab Project
• The Campground
• Use each other as resources to establish
business rules
• Pay close attention to what is not in the
scope of the project
• Sticking with this project all term
Kate Gregory
Are you in a Group?
• Use the workshop hour (now) for a first
group meeting
• It is ok to share the work
– One person write up what all agreed on
– Two people each write half
– I expect you all to be familiar with all of it
• Meet in person, use email, IM, phone,
whatever works for the group
Kate Gregory
Lab 1
• Due Sept 28 start of class
– Hand in paper copy in class (preferred)
– Email to kate@gregcons.com (only approach
for late assignments)
• 2 marks out of 10 deducted for each day
late (based on timestamp of email)
• Title page
• You must be in a group
Kate Gregory
Lab 1 FAQs
• What should we hand in?
• Should we consider electric and ordinary
campsites, walk-ins, cabins?
• Are there rules like “diversion must
terminate use case” or “diversion must call
another use case?”
• Can one diversion jump to another?
Kate Gregory
Lab 1 FAQs
• How many use cases should I have?
• Should we consider very rare possibilities?
• How many diagrams should I have?
• What layout and format should I use?
• Do I have to answer the diversions?
• Do we include non-computer steps? Why?
Kate Gregory
For Next week
Kate Gregory