Table of Contents Previous Section Next Section

Exercises

The following exercises, taken from the use case model for our Internet Bookstore, are designed to test your ability to spot the top 10 mistakes that people make during use case modeling. (The full use case model is presented in Appendix.) Each page with a red label at the top contains three or four of these mistakes; your task is to write corrections on the page near the erroneous material. Following each of these pages is a page with a white label inside a black box at the top; this page contains corrected material (in italics) and explanations of the top 10 rules that were violated on the previous page. Happy hunting!

Exercise 1

[from Open Account]

graphics/01icon16.gif

Basic Course: The Customer enters the required information. The system validates the information and creates a new Account object.

Alternate Course: If any data is invalid, the system displays an appropriate error message.

[from Search by Author]

graphics/01icon14.gif

The user submits the request. The system displays another page that contains the search results.

[from Log In]

graphics/01icon12.gif

The Customer enters his or her user ID and password, and then clicks the Log In button. The system returns the Customer to the Home Page.

Exercise 1

Basic Course: The Customer types his or her name, an email address, and a password (twice), and then presses the Create Account button. The system ensures that the Customer has provided valid data, and then creates an Account object using that data. Then the system returns the Customer to the Home Page.

Alternate Courses:

The Customer types the name of an Author on the Search Page, and then presses the Search button. The system.retrieves all of the Books with which that Author is associated..Then the system displays the list of Books on the Search Results Page.

Basic Course: The Customer enters his or her user ID and password, and then clicks the Log In button. The system validates the login information against the persistent Account data, and then returns the Customer to the Home Page.

Alternate Course: If the system cannot find the specified userID,

On the previous page:

Exercise 2

[from Log In]

graphics/01icon11.gif

Name: Log In

Goal: To log a customer into the system.

Precondition: The Customer is not already logged into the system.

Basic Course: The Customer enters his or her user ID and password, and then clicks the Log In button..

Alternate Courses: .

Postcondition: The Customer is logged into the system.

[from Edit Contents of Shopping Cart]

graphics/01icon13.gif

On the Shopping Cart Page, the Customer modifies the quantity of an Item in the Shopping Cart, and then presses the Update button. Then the Customer presses the Continue Shopping button.

[from Cancel Order]

graphics/01icon12.gif

Basic Course: The system displays the relevant information for the Order on the Cancel Order Page, including its contents and the shipping address. The Customer presses the Confirm Cancel button.

Exercise 2

Basic Course: The Customer enters his or her user ID and password, and then clicks the Log In button..

On the Shopping Cart Page, the Customer modifies the quantity of an Item in the Shopping Cart, and then presses the Update button. The system stores the new quantity, and then computes and displays the new cost for that Item..

Basic Course: The system ensures that the Order is cancellable (in other words, that its status isn't "shipping" or "shipped"). Then the system displays the relevant information for the Order on the Cancel Order Page, including its contents and the shipping address. The Customer presses the Confirm Cancel button. The system marks the Order status as "deleted," and then invokes the Return Items to Inventory use case.

Alternate Course: If the status of the Order is "shipping" or "shipped," the system displays a message indicating that it's too late for the Customer to cancel the order.

On the previous page:

Exercise 3

[from Search by Author]

graphics/01icon15.gif

The Customer types the name of an Author, and then submits a search request..The system retrieves the important details about each Book, and then displays the list of Books.

[from Edit Contents of Shopping Cart]

graphics/01icon18.gif

Basic Course: If the Customer modifies the quantity of an Item in the Shopping Cart, and then presses the Update button, the system will store the new quantity, and then compute and display the new cost for that Item..

Alternate Course: The system will delete an Item from the Shopping Cart if the quantity of that Item in that Shopping Cart becomes 0.

[from Process Received Shipment]

graphics/01icon17.gif

The Receiving Clerk ensures that the Line Items listed on the Purchase Order match the physical items. The Clerk waves the bar code on the packing slip under the sensor at the receiving station. The system executes a "change order status" method to change the Order status to "fulfilled,"and then calls the changeQuantityOnHand method for each of the variousBooks. The Clerk hands the Books off to the Inventory Clerk.

Exercise 3

The Customer types the name of an Author on the Search Page, and then presses the Search button..The system retrieves the important details about each Book..Then the system displays the list of Books on the Search Results Page..

Basic Course: On the Shopping Cart Page, the Customer modifies the quantity of an Item in the Shopping Cart, and then presses the Update button. The system stores the new quantity, and then computes and displays the new cost for that Item..

Alternate Course: If the Customer changes the quantity of the Item to 0, the system deletes that Item from the Shopping Cart.

The Receiving Clerk ensures that the Line Items listed on the Purchase Order match the physical items. The Clerk waves the bar code on the packing slip under the sensor at the receiving station. The system changes the status of the Purchase Order to "fulfilled" and updates the quantity on hand values for the various Books. The Clerk hands the Books off to the Inventory Clerk.

On the previous page:

Exercise 4

[from Check Out]

graphics/01icon13.gif

The Customer selects a billing method and presses the Use This Billing Information button. Then the Customer presses the Confirm Order button. The use case ends.

[from Ship Order]

graphics/01icon12.gif

The Clerk waves the bar code on the packing slip under the sensor at the shipping station. The system changes the status of the Order to "shipping." Then the system retrieves the Shipping Method that the Customer specified for this Order, and displays it on the Shipping Station Console..

[from Track Recent Orders]

graphics/01icon17.gif

The Customer clicks on a link. The system retrieves and displays the Contents of the Order, in view-only mode, on the Order Details Page. This display shows the relevant values of the Order object at the top of the page and the Item details, including the basics about each Book that the Customer ordered (but not the thumbnails), below that. The Customer presses OK to return to the Order Tracking Page.

Exercise 4

The Customer selects a billing method and presses the Use This Billing Information button. The system associates the given Billing Info object with the Candidate Order. Then the system displays the Confirm Order Page.

The Customer presses the Confirm Order button. The system converts the Candidate Order to an Order and destroys the Shopping Cart. Then the system returns control to the use case from which this use case received control.

Basic Course: The Shipping Clerk ensures that the Items listed on the packing slip for the Order match the physical items. The Clerk waves the bar code on the packing slip under the sensor at the shipping station. The system changes the status of the Order to "shipping." Then the system retrieves the Shipping Method that the Customer specified for this Order, and displays it on the Shipping Station Console..

Alternate Course: If the Shipping Clerk finds a mismatch between the Order and the physical items, the Clerk stops processing of the Order until he or she is able to make a match.

The Customer clicks on a link. The system retrieves and displays the contents of the Order, in view-only mode, on the Order Details Page. [note missing text] The Customer presses OK to return to the Order Tracking Page.

On the previous page:

Exercise 5

[from Ship Order]

graphics/01icon16.gif

The Clerk finishes packaging the Order, and records the tracking number, and then sends the package out via the associated Shipper.

[from Track Recent Orders]

graphics/01icon14.gif

The system retrieves and displays the Orders that the Customer has Placed within the last 30 days..The Customer requests details for an Order. The system retrieves and displays the contents of the Order, in view-only mode. The Customer returns to the list of Orders when he or she is finished looking at the details of the given Order.

[from Browse List of Books]

graphics/01icon17.gif

The Customer clicks on a Category on the Browse Books Page. The System invokes the "displayYourSubcategories" method on the Category object. This process continues until there are no more subcategories, at which point the system displays the Books in the lowest subcategory.

Exercise 5

The Clerk weighs the set of physical items. The Clerk packages the Items. The Clerk attaches a manifest appropriate for the given shipping method. The Clerk waves the bar code on the manifest under the sensor. The system records the tracking number from the bar code for the given Order. The Clerk sends the package out via the associated Shipper.

The system retrieves the Orders that the Customer has placed within the last 30 days, and displays these Orders on the Order Tracking Page. Each entry has the Order ID (in the form of a link),.The Customer clicks on a link. The system retrieves and displays the contents of the Order, in view-only mode, on the Order Details Page. The Customer presses OK to return to the Order Tracking Page.

The Customer clicks on a Category on the Browse Books Page. The system displays the subcategories within that Category. This process continues until there are no more subcategories, at which point the system displays the Books in the lowest subcategory.

On the previous page:

Table of Contents Previous Section Next Section