list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

Pizza Delivery

Requirements for this system are as follows:

A take-out pizza restaurant wants to set up an online ordering system. A customer must have an account to use the system. When the customer creates his or her account, the following information is stored: Email address (which becomes the user id), contact phone number, password, name, address, preferred credit card number, and credit card expiry date. When the customer creates an order the following information is stored: The time the order was placed, the address for delivery, the contact phone number, the total price, the credit card number charged, the expiry date of the credit card, the items ordered and the total price. An item can be pizza or drinks.

For each pizza item, the information stored will include the kind of pizza (thin crust, thick crust or gluten-free crust), the size (small, medium, large), the list of toppings (e.g. cheeze, bacon, vegetables, etc.), the number of items like this (e.g. 10 would mean 10 identical pizzas) and the total price for this pizza item. For each drink item, the information stored is type, size, number, and total price. The system also records each delivery: Associated with each delivery is the name of the delivery driver; the time the driver picked up the order(s) and the time each order was delivered. A driver may take more than one order on a delivery run.

Example

// UML Class diagram representing a system for taking online orders for Pizza

class Account
{
  emailAddress;
  contactPhoneNumber;
  password;
  name;
  address;
  preferredCredCard;
  expiryDate;
  0..1 -- * Order;
}

class Order
{
  timePlaced;
  contactPhoneNumber;
  Float totalPrice;
  creditCardCharged;
  expiryDate;
  1 -- * OrderItem;
}

class OrderItem
{
  Integer number;
  Float totalPrice;
}

class PizzaOrder
{
    isA OrderItem;
kind;
  * -> * ToppingType toppings;
  * -> 1 StandardPizzaSize;
}

class ToppingType
{
  description;
}

class StandardPizzaSize
{
  sizeLabel;
}

class DrinkOrder
{
    isA OrderItem;
    drinkSize;
size;
}

class Delivery
{
  Time timePickedUp;
  Time timeDelivered;
  * -- 0..1 Driver;
  0..1 -- 1..* Order;
}

class Driver
{
  name;
}


      

Load the above code into UmpleOnline