Computer Science 262
Calvin College
Professor Keith Vander Linden
Written April 6th, 2004
Revision 1.1, Last Modified May 8th, 2004
Table of Contents
- Introduction
- Purpose and contents of this document
- General description of the project
- Object Design
- Database UML Class diagram
- Interface UML Class diagram
- Database Design
- ERD diagram
- Human-Computer interface design (HCI)
- interface flow diagram
- Bibliography
I. Introduction
- Purpose top
This document is the design specification for eGroup's project, eShopper, based
on the eShopper Requirements Spec.
It contains a general description of the design of our project, an object
design, database design, Human-Computer Interface design, and a bibliography
of our resources. The object design includes a UML class diagram of
our system and a dictionary describing the classes. The database design
includes an entity-relationship diagram of our database and a dictionary
describing the data entries therein. The HCI design includes a flow
diagram of the interface and a dictionary summarizing each screen.
- General Description top
eShopper by eGroup is a system that allows a user to compile a shopping
list based on recipes and other items. This list can be viewed and edited
from three different views: date, recipe, and ingredient. The date view,
which will be used primarily for planning meals organizes the items
by the date on which they will be eaten. The recipe view groups the
ingredients by recipe. Finally, the ingredient view displays the list
as it will be exported to the PDA, organized alphabetically by individual
purchasable item. The system will be maintained in a database that keeps
track of recipes, ingredients, shopping items, and the attributes thereof.
II. Object Design
- Database UML Class Diagram top
The class model for our database composes a straightforward
representation of recipes and shopping lists. This is done through
three primary classes: the List class, the Recipe class, and the Ingredient
class. The Recipe and Ingredient classes are generalized by the Item
superclass and the Recipe class uses the RecipeIngredient class as part
of its implementation.
Click image to enlarge
Database UML Class Dictionary
- List: The List class is a representation of a user's shopping list. It contains anywhere from zero to many Item classes that make
up the recipes and ingredients the user wants to shop for. The
list also contains an owner and a descriptive name, so multiple users
can create different shopping lists and keep track of them.
- Item: The item class is the superclass which contains recipes and ingredients.
Items are added to a List object and contain both a name, such as "Egg
Salad" or "Milk," and a description such as, "Grandma's
Famous Recipe" or "2%."
- Recipe: A Recipe class is an item that can be added to
a shopping list. A Recipe contains many ingredients, which are listed
in each Recipe's RecipeIngredient object. A Recipe also has
a rating determining its value compared to other recipes and
an instructions field that contains preparation techniques.
- Ingredient: An Ingredient class is a basic building block which can
be used in the creation of either a Recipe or a List. An Ingredient
usually corresponds to a single, atomic food item of a single variety,
such as "Cheddar Cheese" or "Ground Beef." In addition,
each Ingredient has an associated cost and category.
- RecipeIngedient: A RecipeIngredient class represents the amount of
a given Ingredient that exists in a particular Recipe, and the unit of measurement for that Ingredient. Each
Recipe will have a group of RecipeIngredient objects which compose
the list of Ingredients necessary for the Recipe.
- Interface UML Class Diagram top
The class model for our interface describes the way the interface components interact
to create a consistent user interface. There are three classes representing the three main views: the
date view, the recipe view, and the list view. Each of these allows the user to
add an item to the list and to manage his/her recipes.
Click image to enlarge
Interface UML Class Dictionary
- View: The View class is the superclass that is inherited by each of the three
main views: date view, recipe view, and list view. It provides a button for the user
to add an item to the list and a button to manage the user's recipes in the database.
- DateView: The DateView class is a window that displays a list of
collapsible days in chronological order that expand into the recipes chosen for that
day, which again expand into the ingredients in those recipes.
- RecipeView: The RecipeView class displays the list alphabetized by recipe.
Each recipe, again, can be expanded into its ingredients.
- ListView: The ListView class displays just the individual purchasable items
in alphabetical order.
- AddItem: The AddItem class is the window that is displayed when the user
wishes to add an ingredient or recipe to the list from any view. It contains menus to
optionally assign a date to the item being added to the list and menus to choose
from either the recipes or the ingredients in the database. It also contains
buttons for the user to add new recipes and ingredients to the database.
- RecipeWindow: The RecipeWindow Class is the superclass of the CreateRecipe and
ManageRecipes classes. It contains textboxes for the name and description of the
recipe and menus to select the ingredients in the recipe. It also contains a
button to create a new ingredient in the database.
- CreateRecipe: The CreateRecipe class is the basic version of the RecipeWindow.
- ManageRecipes: The ManageRecipes class is a RecipeWindow that has a menu at
the top in place of the name text box from which an existing recipe in the database can
be selected. The only other addition is a button to create a new recipe.
- IngredientWindow: The IngredientWindow class is the superclass of the
CreateIngredient and ManageIngredients classes. It contains text boxes for the name and
description of the ingredient.
- CreateIngredient: The CreateIngredient class is the basic version of the
IngredientWindow.
- ManageIngredients: The ManageIngredients class is an IngredientWindow that has
a menu at the top in place of the name text box and a button to create a new ingredient.
III. Database Design
- ERD top
The three major elements of the database are Recipes,
Ingredients and Lists. Each of these entities has one table in the database
structure. Recipes and Ingredients can be added to a List, and Recipes
have Ingredients in them. A List contains Recipes from the Recipe table and Ingredients from the Ingredients table that are not found in a Recipe.
Click image to enlarge
Database Dictionary
- Recipe table: A table of recipes the user has entered into their recipe
database.
- Contains the unique recipe ID.
- Contains the name of the recipe.
- Contains a description of the recipe.
- Contains the directions for making the recipe.
- Contains a rating for the recipe.
- Ingredient table: A table of items that are either ingredients in a
recipe or single items the user needs to shop for.
- Contains the unique ingredient ID.
- Contains the name of the ingredient.
- Contains the category of the ingredient.
- Contains a description of the ingredient.
- Contains the cost of the ingredient.
- Has/Is in table: A table of the amount of a certain ingredient found
in a recipe.
- A recipe has one to many ingredients and an ingredient is in zero
to many recipes.
- Contains the amount of an ingredient in a recipe.
- Contains the unit the ingredient is measured in.
- List table: A table of shopping lists created by users.
- Contains the unique list ID.
- Contains the owner of a list.
- Contains the name of a list.
- Recipe List table: A table showing which recipes are in which list.
- A recipe is on one to many lists and a list has one to many recipes.
- Contains the meal the recipe is for.
- Contains the date of the recipe.
- Ingredient List table: A table showing which ingredients are in which
list.
- An ingredient is on one to many lists and a list has one to many ingredients.
- Contains the meal the ingredient is for.
- Contains the date of the ingredient.
IV. Human Computer Interface Design (HCI)
- Interface Flow Diagram top
A variety of pop-ups allow the user to add ingredients and define new recipes. Below is a description of what each one does.
Click image to enlarge
Interface Flow Dictionary
- Main Window: The user can manage the shopping list(s) from this window. There are three different views of the list available: Date
View, Recipe View and Item View. This window provides access to all the other windows in the program.
- Add Item to List: The user can add or update recipes and ingredients to the shopping list from this window. The user may assign a future date and a meal category to the item.
- Create New Recipe: Here the user can add a new recipe to the database, and assign ingredients to it.
- Create New Ingredient: Here the user can add a new ingredient that is not in a recipe to the database.
- Manage Recipes: The user can change the name and details of a
recipe already in the database from this window.
- Manage Ingredients: Here the user can change the name and details
of an ingredient already in the database.
V. Bibliography