Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
 
Training Index

Writing Advanced Applications
Chapter 1 Continued: Project Requirements and Modeling

[<<BACK] [CONTENTS] [NEXT>>]

The first step in determining project requirements is to interview the user base to find out what they want in an online auction. This is an important step, and one that cannot be overrated because a solid base of user-oriented information helps you define your key application capabilities.

Chapter 2 walks through the application code, explains how the Enterprise JavaBeans platform works, and tells you how to run a live demonstration. If you have never seen or used an online auction, here are mockups of the example auction application HTML pages.


Interview User Base

For the sake of discussion and to keep things simple, this discussion assumes interviews with the user base found auction house and user requirements, as follows:

Auction House Requirements

  • Require buyer and seller information
  • Bill sellers for posting items
  • Record and report the day's transactions
User Requirements
  • Bid on or sell an item
  • Search or view items for sale
  • Notify buyer and seller of sale

Model the Project

After analyzing the requirements, you can build a use case diagram for the application to gain a better understanding of the elements needed in the application and how they interact.

A use case diagram shows the relationships among actors and use cases within the system. A use case is a unique function in a system, and an actor is the person or software that performs the action or use case. For example, a buyer is the actor that performs the function (use case) of bidding on an auction item, and the seller is the actor that performs the use case of posting an item for auction.

Not all actors are people, though. For example, the software is the actor that determines when an item has closed, finds the highest bidder, and notifies the buyer and seller of the sale.

The Unified Modeling Language (UML) is the tool of choice for creating use case diagrams. The Use Case diagram below uses UML to describe the buyer and seller use cases for the online auction application.

In UML, systems are grouped into squares, actors are represented by stick figures, use cases are denoted by ovals, and the lines show how actors use the system.

The following descriptions further define the project. These descriptions are not part of UML, but are a helpful tool in project definition.

House Identifies Buyers and Sellers

An auction application is used by buyers and sellers. A buyer needs to know who the seller is to pay him or her, and the seller needs to know who the buyers are to answer product questions and to finalize the sale. So, to post or bid on an auction item, buyers and sellers are required to register. Registration needs to get the following information from buyers and sellers:
  • User ID and password for buying and selling.
  • Email address so highest bidder and seller can communicate when item closes.
  • Credit card information so auction can charge sellers for listing their items.
Once registered, a user can post or bid on an item for sale.

House Determines Highest Bidder

Nightly, the auction application queries the database to record and report the day's transactions. The application find items that have closed and determines the highest bidder.

House Notifies Buyers and Sellers

The auction application uses email to notify the highest bidder and seller of the sale, and debit the seller's account.

Anyone Searches for an Item

Sellers and buyers enter a search string to locate all auction items in the database.

Anyone Views Items for Sale

To popularize the auction and encourage new buyers and sellers, the application allows anyone to view auction items without requiring user ID and password identification. To keep things simple, the auction lets anyone view summarized lists of items in the following three ways:
  • All items up for auction
  • New items listed today
  • Items due to close today

Anyone Views Item Details

The summarized lists link to the following detailed information on each item. Detail information on auction items is available to anyone without identification.
  • Item Summary
  • Auction Item number
  • Current price
  • Number of bids
  • Date posted for auction
  • Date item closes
  • Seller ID
  • Highest bid
  • Item description

Seller Posts Items for Sale

To post an item for sale, a seller needs to identify himself or herself and describe the item for sale, as follows:
  • User ID and password for seller identification
  • Summary description of item
  • Starting Price for bidding
  • Detailed description of item
  • Number of days item is available for bidding

Buyer Bids on Items

The detailed summary page for each item lets registered users identify themselves and bid on the item by providing the following information:
  • User ID
  • Password
  • Bid amount

Activity Diagram

The activity diagram shows the flow of tasks within the auction house as a whole. This diagram shows the auction application. The solid black circle on the left shows the beginning of activities, and the white circles with black dots in the center denote where activities end.

[TOP]


[ This page was updated: 13-Oct-99 ]

Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-99 Sun Microsystems, Inc.
All Rights Reserved. Legal Terms. Privacy Policy.