Skip to main content

Buy a Product conceptual model

Short answer

Candidate concepts: Customer, Catalog, Item, ShoppingBasket, BasketLine, Sale, CreditCard, ShippingInfo, Authorization, EmailConfirmation. A Customer has 0..1 ShoppingBasket; a Basket contains 1..* BasketLines referring to Item. The Basket becomes a Sale (0..1) with 1 ShippingInfo, 1 Authorization, paid by CreditCard.

A web-based online store has 'Buy a Product' scenario as follows: The customer browses the catalog and adds desired items to the shopping basket. When the customer wishes to pay, the customer describes the shipping and credit card information and confirms the sale. The system checks the authorization on the credit card and confirms the sale both immediately and with a follow-up e-mail. Now construct conceptual model for this scenario.

A conceptual model (domain model) shows the concepts of the real domain, their attributes and associations. It is not a software design. Candidate concepts are found by identifying the nouns in the scenario.

Concepts: Customer, Catalog, Item (product), ShoppingBasket, BasketLine (basket item), Sale (order), CreditCard, ShippingInfo, CreditCardAuthorization (payment authorization), EmailConfirmation (follow-up e-mail).

Assumptions: one basket per customer visit; a sale is made from the basket when the customer pays; one authorization per sale.

                          lists
 +---------+ 1                  * +--------+
 | Catalog |----------------------|  Item  |
 +---------+                      +--------+
                                       | 1
                                       | refers to
                                       | *
 +----------+ 1  0..1 +----------+ 1  1..* +------------+
 | Customer |---------| Shopping |---------| BasketLine |
 +----------+   has   | Basket   | contains| (quantity) |
      | 1             +----------+         +------------+
      | places             | 1
      | *                  | becomes
 +----------+ 0..1         |
 |   Sale   |--------------+
 +----------+
  |    |    |    |
  |    |    |    +-- confirmed by --> EmailConfirmation (1)
  |    |    +------- authorised by --> Authorization (1)
  |    +------------ paid with ------> CreditCard (1)
  +----------------- shipped to -----> ShippingInfo (1)

The main associations with multiplicity:

AssociationMultiplicity
Customer - ShoppingBasket1 to 0..1
ShoppingBasket - BasketLine1 to 1..*
BasketLine - Item* to 1
Catalog - Item1 to *
ShoppingBasket - Sale1 to 0..1
Customer - Sale1 to *
Sale - ShippingInfo1 to 1
Sale - CreditCard* to 1
Sale - Authorization1 to 1
Sale - EmailConfirmation1 to 1

Attributes (examples): Customer(name, email, address); Item(id, name, price); BasketLine(quantity); CreditCard(number, expiry, holderName); ShippingInfo(address, method); Sale(date, total, status); Authorization(code, status, date).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Object Oriented Analysis and Design chapter 2 questions →