Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 34

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

21-Sep-10 2 Use Cases Lab 1: Use cases    


28-Sep-10 3 CRC Cards, collab graphs Lab 2: CRC cards lab 1 5%

5-Oct-10 4 start class diag lab 2 5%


12-Oct-10 5 Finish class diag, Associations / Visibility Lab 3: Class Diag

19-Oct-10 6 Inh & Polymorphism   lab 3 5%  


26-Oct-10 Reading Break
2-Nov-10 7 Interaction diag / Design Patterns /midterm review Lab 4: Interaction Diag    

9-Nov-10 8 no lecture - midterm     Midterm 25%

16-Nov-10 9 Good Design / Modules & Packages / Metrics Lab 5: Critiques lab 4 5%  

23-Nov-10 10 State diagrams / Activity diagrams / Deployment      


diagrams / Summary and Conclusion / The Future

30-Nov-10 11 Critiques critique lab (before


class) 15%

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?

• What the users are doing with the system?


• Or, in the case of a new system, what users
will be doing with the system?

Use cases provide comprehensive


documentation of the system under study,
using the language of the customer.

Kate Gregory
Use Cases Capture Sequence

• Use cases are scenarios for understanding


system requirements.
• A use case shows a course of events in
order and carries a sense of time.

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

Borrow books uses

Checking Library Card


extends
uses
Inter library loan
Circulation Clerk
Member Return Books
Performing research

Reading books Supplier


Newspaper
Purchasing Supplies
Kate Gregory
What are use cases for?
• Getting requirements from user
• Understanding business rules
• Discovering objects, and their attributes and
methods
• Will be test cases when implementation is
complete

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

• Read notes up to end of use cases


• Hand in Lab 1 before class starts
• Lab 2 will be available
• Read ahead: CRC cards and collaboration diagrams

Kate Gregory

You might also like