Lecture #2

advertisement
CpSc 372: Introduction to Software Development
Autumn 2004
Practice Session #1
The following excerpt is from the initial scope document of a system that will be used by
a local bookseller to extend their business boundaries to the internet.
The Online Bookstore System (OBS) will be a web-based application that
allows customers to browse and purchase online product offerings. The
application will support the notion of an online shopping cart, similar to
other online retailers such as Amazon.com. The checkout features of the
system will be integrated with our credit card transaction processor, as
well as our internal billing system. The system will also provide an
administrator-view that will allow authorized employees to view and
administer products, customers, and orders.
During the kickoff meeting where this document fragment was written, the project team
created the following use-case-diagrams to give a high-level overview of the system
requirements.
Online Bookstore
System
Browse products
Add products to
shopping cart
View shopping cart
Customer
Credit card
transaction processor
Checkout
Billing system
Figure1. Use-Case Diagram #1
CpSc 372: Introduction to Software Development
Autumn 2004
Online Bookstore
System
Administer products
Administer
customers
Employee
Administer orders
Figure 2. Use-Case Diagram #2
The project team also assembled a set of documents describing each of the use-cases
identified in the use-case diagrams shown above. In some instances, the use-cases were
described informally. For the more complex use-case scenarios, a more formal structure
was used. As an example, consider the following partial description of the Checkout
use-case identified in the first diagram.
Use-case: Checkout
Primary actor: Customer
Goal in context: To purchase the items contained in the customer’s
shopping cart using the customer’s credit card.
Preconditions: The user of the system is logged-in as a pre-existing
customer; the user’s shipping address is therefore known.
Trigger: The user decides to select the checkout option on the web site.
Scenario: <TO BE COMPLETED>
Exceptions: <TO BE COMPLETED>
Task #1. Your task in this portion of the exercise is to complete the scenario portion of
the use-case, including possible exceptions. Complete this exercise on the first
transparency. (See page 190 of your book for an example.)
Task #2. Your task in this portion of the exercise is to develop an activity diagram that
provides a diagrammatic view of the use-case scenario that you developed in the previous
CpSc 372: Introduction to Software Development
Autumn 2004
task. Complete this exercise on the second transparency. (See page 192 of your book for
an example.)
Task #3. While working on the previous task, you should have found errors and/or
omissions that must be corrected in the first use-case diagram shown in Figure 1. Your
task in this exercise is to update the first use-case diagram to reflect what you learned
while working on the previous task. Complete this exercise on the third transparency. Do
you have to make any changes to the use-case diagram shown in Figure 2?
Task #4. Your task in this portion of the exercise is to develop a level 0 data flow
diagram (i.e. context diagram) for the Online Bookstore System. Remember that a data
flow diagram takes an input-process-output view of the system to be constructed, and
provides another view of the system to be built. A portion of the level 0 data flow
diagram is given on your fourth transparency. Complete this diagram by adding the
appropriate external entities, data/control objects, and data stores. (See page 196 of your
book for an example.) What would the level 1 data flow diagram look like?
Download