You are on page 1of 22

Online Book Shop

Conceptualization
Bookshop: Books, MusicCDs, Software Customers: Register, Browse, Order Bookshop: Charge, Ship

Online Book Shop


Analysis: Identify Function Points
Actors
Customer Bookshop staff

Use-cases
Customer registers details Customer browses and orders items Bookshop staff ships to customer Customer updates details Bookshop staff updates items

USE CASE DIAGRAM

Online Book Shop


Analysis: Identify Scenarios
Customer registers details ... Customer browses and orders items
System welcome message Customer login System validates password
Failure? System error message Exit

Customer done System creates order System shows order and cost Customer agrees to pay System sends invoice to customer Bookshop staff ships to customer ...

Loop
Customer browses System displays item information Customer selects number System adds to shopping cart

Customer updates details ... Bookshop staff updates items ...

ACTIVITY DIAGRAM

Online Book Shop


Design: Identify Classes
From conceptualization
Bookshop Book MusicCD Software Customer Login Password Item order ShoppingCart Order BillingAddress BookshopStaff ShippingAddress

Initial guess
Bookshop Book MusicCD Software Customer ItemOrder ShoppingCart Order BillingAddress BookshopStaff ShippingAddress

From analysis

CLASSES WITH NAMES

Online Book Shop


Design: Identify Inheritance Relationships Among Classes
Inheritance
Book is-a Item MusicCD is-a Item Software is-a Item BillingAddress is-a Address ShippingAddress is-a Address

CLASSES WITH INHERITANCE

Online Book Shop


Design: Identify Attributes of Classes
Isolated class design - attributes Bookshop
name

ShoppingCart Order
salesTax shippingFee total name customerID password streetNumber street city state country postCode

BookshopStaff
name

Item
title publisher yearPublished price

Customer

Book
author edition isbn

Address

MusicCD
artist

Software
version

ItemOrder
item quantity

BillingAddress ShippingAddress

CLASSES WITH ATTRIBUTES

Online Book Shop


Attributes from Aggregation and Composition
Bookshop
Items BookshopStaff Customers Orders

Customer
Shopping cart Order BillingAddress ShippingAddress

Shopping cart
ItemOrders (composition)

Order
Customer ItemOrders (composition)

CLASSES WITH AGGREGATION AND COMPOSITION

Online Book Shop


Design: Identify Methods of Classes
Class methods (CRC cards)
Bookshop

BookshopStaff

name

name MusicCD author ed itio n isb n

Item

Book title pub lisher yearPub lished price


Software

artist

versio n

ItemOrder

Shopp ingCart

Order

item quantity

salesTax shipp ingFee total Shipp ingAdd ress

Custo mer

Address

BillingAddress

name custo merID password

streetNumber street city state country postCode

CLASSES WITH METHODS

Online Book Shop


Analysis: Identify Objects
Customer browses and orders items
System welcome message Customer login Get customer object System validates password
Failure? System error message Exit Success Customer object initialized Shopping cart created for customer

System creates order Order object created from shopping cart System shows order and cost Customer agrees to pay Order object authorized System sends invoice to customer Order object passed to shipping module Bookshop staff ships to customer

Loop
System displays item information Get item from items list Item displays Customer selects number System adds to shopping cart Shopping cart object updated

Customer done

ACTIVITY DIAGRAM WITH OBJECTS

Sequence Diagram

Collaboration Diagram

Online Book Shop


Design: Identify Packages
BookshopInformation
Bookshop BookshopStaff Item Book MusicCD Software Customer Address BillingAddress ShippingAddress

Customers

Online ordering
ItemOrder ShoppingCart Order

PACKAGES

Deployment Diagram
System 1 System 10 Server

Network

System 100

You might also like