Design & Risk table

advertisement
2013
RecipeCart Design Document
AnselmTamasang, Michael Woods,
Darren Ringer, Chris Barill
3/10/2013
Table of Contents
1.0 Introduction ............................................................................................................................................ 4
1.1 Goals and Objectives .............................................................................................................................. 4
1.2 Statement of scope .................................................................................................................................. 4
1.3 Software context ..................................................................................................................................... 4
1.4 Major constraints .................................................................................................................................... 4
2.0 Data design.............................................................................................................................................. 5
2.1 Internal software data structures ......................................................................................................... 5
2.2 Global data structures ......................................................................................................................... 5
2.2.1 MainMenu .................................................................................................................................... 5
2.3 Temporary data structures ................................................................................................................... 5
2.3.1 Receipt Photo ............................................................................................................................... 5
2.3.2 OCR Data : text data .................................................................................................................... 5
2.4 Database description ........................................................................................................................... 6
2.4.1 Pantry Data store class ................................................................................................................. 6
3.0 Architectural and Component-level Design ............................................................................................ 7
3.1 Program Structure ........................................................................................................................... 7
3.1.1 Architecture diagram ....................................................................................................................... 7
3.2 Add Ingredient .................................................................................................................................... 8
The Add Ingredient component allows users to add ingredients into the pantry. ................................. 8
3.2.1 Processing narrative (PSPEC) ...................................................................................................... 8
3.2.2 Interface Description. ................................................................................................................... 8
3.2.3 Add Ingredient Processing Detail ................................................................................................ 8
3.2.3.2 Restrictions/limitations ............................................................................................................. 9
3.2.3.3 Local data structures ................................................................................................................. 9
3.2.3.4 Performance Issues ................................................................................................................... 9
3.2.3.5 Design constraints ..................................................................................................................... 9
3.3 Search Recipe...................................................................................................................................... 9
The Search Recipe button allows the user to find recipes. ................................................................... 9
3.3.1 Processing narrative (PSPEC) ...................................................................................................... 9
3.3.2 Interface Description. ................................................................................................................... 9
3.3.3 Find Recipe Processing Detail ................................................................................................... 10
3.3.3.1 Algorithmic model .................................................................................................................. 10
3.3.3.2 Restrictions/limitations ........................................................................................................... 10
3.3.3.3 Local data structures ............................................................................................................... 10
3.3.3.4 Performance Issues ................................................................................................................. 10
3.3.3.5 Design constraints ................................................................................................................... 10
3.4 Manage Pantry .................................................................................................................................. 11
Manage pantry button will allow the user to view all available ingredients ....................................... 11
3.4.1 Processing narrative (PSPEC) .................................................................................................... 11
3.4.2 Interface Description. ................................................................................................................. 11
3.4.3 Manage Pantry Processing Detail .............................................................................................. 11
3.4.3.1 Algorithmic model .................................................................................................................. 11
3.4.3.2 Restrictions/limitations ........................................................................................................... 12
3.4.3.3 Local data structures ............................................................................................................... 12
3.4.3.4 Performance Issues ................................................................................................................. 12
3.4.3.5 Design constraints ................................................................................................................... 12
3.5 Favorites............................................................................................................................................ 12
The favorite button will allow the user to view all available favorite recipes .................................... 12
. ........................................................................................................................................................... 12
3.5.1 Processing narrative (PSPEC) .................................................................................................... 12
3.5.2 Interface Description. ................................................................................................................. 12
3.5.3 Favorites Processing Detail ........................................................................................................ 12
3.5.3.1 Algorithmic model .................................................................................................................. 13
3.5.3.2 Restrictions/limitations ........................................................................................................... 13
3.5.3.3 Local data structures ............................................................................................................... 13
3.5.3.4 Performance Issues ................................................................................................................. 13
3.5.3.5 Design constraints ................................................................................................................... 13
3.6 Home Screen ..................................................................................................................................... 14
The Home Screen component provides the main interface for the RecipeCart application. This
component allows a user to view all available objects that are displayed. ......................................... 14
3.6.1 Processing narrative (PSPEC) .................................................................................................... 14
3.6.2 Interface Description. ................................................................................................................. 14
3.6.3 Home Screen Processing Detail ................................................................................................. 14
3.6.3.1 Algorithmic model .................................................................................................................. 14
3.6.3.2 Restrictions/limitations ........................................................................................................... 14
3.6.3.3 Local data structures ............................................................................................................... 14
3.6.3.4 Performance Issues ................................................................................................................. 14
3.6.3.5 Design constraints ................................................................................................................... 14
3.7 External Interfaces ............................................................................................................................ 14
3.7.1 External machine interfaces ....................................................................................................... 14
3.7.2 External system interfaces ......................................................................................................... 14
4.0 User interface design............................................................................................................................. 14
4.1 Description of the user interface ....................................................................................................... 14
4.1.1 Screen images ....................................................................................................................... 14-15
4.1.2 Objects and actions .................................................................................................................... 16
4.2 Interface design rules ........................................................................................................................ 16
4.3 UIDS description ......................................................................................................................... 16-17
5.0 Restrictions, Limitations, and Constraints ............................................................................................ 17
6.0 Testing Issues ........................................................................................................................................ 17
6.1 Classes of Tests ................................................................................................................................. 17
6.2 Expected Software Responses .......................................................................................................... 17
6.3 Performance Bounds ......................................................................................................................... 18
6.4 Critical Components ......................................................................................................................... 18
7.0 Risk Table ............................................................................................................................................. 19
8.0 Design Plan ........................................................................................................................................... 20
8.1 First Release:..................................................................................................................................... 20
8.2 Second Release: ................................................................................................................................ 20
8.3 Third Release: ................................................................................................................................... 20
1.0
Introduction
This document defines the requirements for the RecipeCart application (RC). RC will allow the
user to generate recipe’s that are custom to the food available at hand. This application will be
developed for the Android platform, available to run on the newest operating system. The
following sections will describe all data, functional and behavioral requirements for RC.
1.1 Goals and Objectives
The goal of this project is to create an Android software application that is accessible to
everyone. The app will be easy to use with a variety of features available. These features will
include a virtual pantry to list everything within the user’s kitchen, a hierarchy of how different
foods are related to one another, a search engine that will pinpoint the location of food they wish
to purchase within a specified grocery store, and a recipe generator.
1.2 Statement of scope
RC will require minimal user input, yet still provide substantial information regarding the desired
output. An Optical Character Recognizer (OCR) scanner will be used to scan the grocery lists,
and if discrepancies arise, user input will be required to verify the type of food they wish to add.
A database will be used to keep track of all the foods owned. From this database, ingredients will
be searched for when the user decides what kind of dish they wish to create.
1.3 Software context
The intended use for this application is for commercial purposes. The application must meet the
needs of the average android mobile user. RC will appeal to a very wide audience since both
proficient cooks, and those who only wish to cook more but lack the knowledge of recipes can
benefit from this application.
1.4 Major constraints
RC will require access to store plan-o-grams for an optimal item locator. As a result, allowances
must be made to account for possible changes within the store’s POG. A separate server will be
accessed that is linked directly to store POG’s for up-to-date data access. The OCR is a tool that
RC will use with the software to keep track of the ingredients owned by the user. However,
complications may occur in regards to scanning incompatibilities between grocery stores.
Consequently, user verification will be required for the supposed ingredients.
2.0 Data design
RecipeCart is a highly data-driven application, and its operation depends on a few key data
structures to be used in managing things like ingredients on hand (the pantry) and recipes. Data
will also be passed between the system and external libraries available on the Android platform
(or deployed alongside the system).
2.1 Internal software data structures
 Ingredient
o Name : String
o Quantity : int
o Type : string
o FoodGroups : String
 ingredientID : int
 Recipe
o RecipeName : string
 Favorites
o recipeID : int
 Pantry
o ingredientID : int
2.2 Global data structures
2.2.1 MainMenu
The Add Ingredient, Manage Pantry, Favorites and Search Recipe objects are all
the global classes. These will be main classes which the user will select before
moving on to the sub classes.
2.3 Temporary data structures
2.3.1 Receipt Photo
RecipeCart may acquire a photograph from the Android platform's integrated
camera. The photo will then be processed. Once the processing has finished and
the OCR has filled in all the necessary fields, the photo will be deleted
automatically.
2.3.2 OCR Data : text data
After using an OCR library to process an image and acquire text, RecipeCart will
sequentially prompt the user to verify each item textually identified by the OCR.
This data will not be maintained beyond this phase of execution, except as
converted to actual ingredient objects to be added to the pantry.
2.4 Database description
2.4.1 Pantry Data store class
This class will serve as the primary database for RecipeCart. Only ingredient
objects will be stored here; all specific information about ingredients on hand including their quantity - is stored in the actual ingredient object.
3.0 Architectural and Component-level Design
3.1 Program Structure
3.1.1 Architecture diagram
3.2 Add Ingredient
The Add Ingredient component allows users to add ingredients into the pantry.
3.2.1 Processing narrative (PSPEC)
A User chooses the ‘Add Ingredient’ option from the main screen. The user will
then be presented with 2 different buttons, ‘OCR Scan’ or ‘Manual Input’. The
user will select either or and follow the instructions. When completed, the user
will be prompted to verify the ingredients.
3.2.2 Interface Description.
The OCR Scan takes an image file (Receipt_Img), reading through the receipt and
collecting the important information and automatically sending these data fields
into the database (pantry) and saving the context for further use.
The Manual Input takes in Name (string), Quantity (double) and Type (string),
inputted manually by the user and later asked to verify before uploading data into
the database (pantry) for further usage.
3.2.3 Add Ingredient Processing Detail
3.2.3.1 Algorithmic model
3.2.3.2 Restrictions/limitations
The component must interact with the pantry and provide an easy to use
interface for the user. The OCR scan may show flaws due to camera
capabilities.
3.2.3.3 Local data structures
The component creates an Ingredient object with the following attributes
[Ingredient_ID:Int, Ingredient_Name:string,Quantity:double,Type:string].
3.2.3.4 Performance Issues
The efficiency of this component depends heavily on the performance of
the device specifications.
3.2.3.5 Design constraints
The UI must facilitate fast and accurate entry of the ingredient information
via manual or OCR.
3.3 Search Recipe
The Search Recipe button allows the user to find recipes.
3.3.1 Processing narrative (PSPEC)
A User chooses the ‘Search Recipe’ option from the main screen. The user will
then be presented with 2 different buttons, ‘Advance Search’ or ‘Automatic
Search’. The user will select one and follow the instructions. When completed,
the user will be prompted to verify the list’.
3.3.2 Interface Description.
The automatic search component will take int as its parameter. When in the
Automatic search button, the user will not have to input any parameters; rather the
device will automatically search for recipes based on the user’s pantry.
The advanced search will also take int as its parameter. Instead of automatically
searching, the user will do a more refined search for what recipes the user wants
to prepare. The user will be shown a list of the pantry and will then make a
selection of which ingredients to add to the search field.
When a recipe has been found through any of the search methods, the user will be
able to bookmark the recipes into favorites. This will allow the user to later
thoroughly look through the recipe when needed.
3.3.3 Find Recipe Processing Detail
A detailed algorithmic description for each component is presented. Section 3.2.3
is repeated for each of n components.
3.3.3.1 Algorithmic model
3.3.3.2 Restrictions/limitations
The component must interact with the database and quickly verify inputs
thus bringing back recipes for the user.
3.3.3.3 Local data structures
The component creates a recipe for user to use. [Ingredient_ID:Int]
3.3.3.4 Performance Issues
The efficiency of this component depends heavily on the performance of
the website.
3.3.3.5 Design constraints
None
3.4 Manage Pantry
Manage pantry button will allow the user to view all available ingredients
3.4.1 Processing narrative (PSPEC)
A User chooses the ‘Manage Pantry’ option from the main screen. The user will
then be presented with all ingredients. The ingredients will be in subcategories by
type (meat, vegetables, Grains etc…). With this list the user will be allowed to
see the ingredients and edit or delete them if need be.
3.4.2 Interface Description.
When the list has been outputted to the user, the user will click on an ingredient to
delete the ingredient or change the quantity. When quantity has been changed the
user will click done, and it will save automatically. If the user deletes the
inventory, the app will ask for verification first then be deleted.
3.4.3 Manage Pantry Processing Detail
A detailed algorithmic description for each component is presented.
3.4.3.1 Algorithmic model
3.4.3.2 Restrictions/limitations
The component must interact with the database to display the inventory to
the user.
3.4.3.3 Local data structures
The component displays all ingredients for user to use. [Ingredient_ID:
Int]
3.4.3.4 Performance Issues
The efficiency of this component depends heavily on the performance of
the database.
3.4.3.5 Design constraints
None
3.5 Favorites
The favorite button will allow the user to view all available favorite recipes
.
3.5.1 Processing narrative (PSPEC)
A User chooses the ‘Favorites’ option from the main screen. The user will then be
presented with a list of all bookmarked recipes.
3.5.2 Interface Description.
When the list has been outputted to the user, the user will click on a recipe. Once
in the recipe, the user can see all ingredients needed. They are not able to edit the
ingredients because it will be ingredients from the database of online recipe
repository. The user is allowed to delete the recipe from the favorites menu.
3.5.3 Favorites Processing Detail
A detailed algorithmic description for each component is presented.
3.5.3.1 Algorithmic model
3.5.3.2 Restrictions/limitations
The component must interface with the database to display the favorite
recipes chosen by the user from the search methods.
3.5.3.3 Local data structures
The component displays all recipes for users to use. [Recipe_ID: Int]
3.5.3.4 Performance Issues
The efficiency of this component depends heavily on the performance of
the database.
3.5.3.5 Design constraints
None
3.6 Home Screen
The Home Screen component provides the main interface for the RecipeCart application.
This component allows a user to view all available objects that are displayed.
3.6.1 Processing narrative (PSPEC)
Once the app is open, the app will display to the user four options. Manage
Pantry, Favorites, Add Ingredient, Search Recipes. These will be the main
functions. There is no log in/log out since the user’s pantry will be stored on the
phone itself and not via online database. The user will then select either of those
functions.
3.6.2 Interface Description.
This component provides as an output the main functions of the application.
3.6.3 Home Screen Processing Detail
3.6.3.1 Algorithmic model
3.6.3.2 Restrictions/limitations
None
3.6.3.3 Local data structures
N/A
3.6.3.4 Performance Issues
This component will rely on the ability for the app to update past user
entries and not crash.
3.6.3.5 Design constraints
None
3.7 External Interfaces
3.7.1 External machine interfaces
This program will not interface to any hardware.
3.7.2 External system interfaces
This program will need to interface with a database website to facilitate its recipes
for the user.
4.0 User interface design
A description of the user interface design of ReceiptCart will be presented below.
4.1 Description of the user interface
4.1.1 Screen images
The following images represent the interface of RC from the user’s point of view.
Figure 1: RC home screen
Figure 3: RC Manage Pantry
Recipes
Figure 2: RC OCR Scanner
Figure 4: RC Favorite
4.1.2 Objects and actions
4.1.2.1 Figure 1:
This is a representation of the home screen the user can expect to see once
starting the RC application. From this screen, the user will be able to
choose between four different options. The menu buttons will allow the
user to add ingredients either manually or with the OCR scanner, search
for recipes, manage the inventory of ingredients owned, or browse favorite
recipes saved.
4.1.2.2 Figure 2:
This shows the OCR scanner function available to the user for adding
ingredients to the pantry. Once this option is selected, RC will
automatically bring up the camera and activate the scanner for optimal
functionality. Once the receipt is lined up properly with the OCR, the user
can select the scan receipt button to save ingredients from the receipt to
the pantry.
4.1.2.3 Figure 3:
This represents the pantry manager. The user will be shown a list with
subsections. Each main heading will represent a major food group, where
corresponding types are automatically sorted once entered into RC. The
user can then select ingredients to edit the quantity or remove from the
pantry.
4.1.2.4 Figure 4:
This shows the user’s Favorites. On this screen, the user can browse or
remove a recipe if desired.
4.2 Interface design rules
The goal for RC’s interface is for the user to feel as though the application was
designed solely for the device they own. The look and feel will be tailored expressly for
the Android OS, providing the user with all of the standard manipulation and consistency
tools expected from great apps.
4.3 UIDS description
This project will make ample use of the Android Development Tools (ADT) plugin for
eclipse. The user interface for RC will be custom built using this tool. However, within
the ADT plugin, the visual editor tool for android application layouts is discontinued due
to lack of developer support. As a result, a second plugin, WindowBuilder, will be used.
WindowBuilder is a powerful Java GUI designer that will allow for easy graphical
interfaces without excessive code writing.
5.0 Restrictions, Limitations, and Constraints
The restrictions, limitations, and constraints for the RM will mostly be limited to the
Android platform and OCR scanner. The following list will describe these issues.
 There are many Android Operating Systems, and making RM compatible with
them all is impractical and unnecessary. Consequently, the RM will only work
with the most recent OS series and provide updates for subsequent releases.
 Camera quality may affect the scanner usage, limiting the user to manual input
only.
 Receipts will not be saved that the user scans. As a result, ingredients that the user
wishes to save to the pantry must be verified after the initial scan lest the data is
lost.
 Graphics and a logo will need to be uniquely created so that the RM application
can be distinctively identified by the user.
Only the most important functionality of the system will need to be tested. This includes
pantry manipulation and searching for recipes.
6.0 Testing Issues
6.1 Classes of Tests
All high-level operations of the system must be tested for proper functionality, including:
add ingredients, manage pantry, and search recipes. All individual functions will be
tested as well for proper output given certain inputs.
6.2 Expected Software Responses
Manual Add – pantry updated.
OCR Add – image should yield a list of ingredients; each ingredient should require
verification and quantity from user.
Manage Pantry – all edit functions should work properly, including item removal and
quantity adjustment.
Automatic Search – should return only recipes containing ingredients that exist in the
pantry.
Advanced Search – should return recipes with the specified ingredients.
6.3 Performance Bounds
The app needs to access the internet to retrieve recipes, so it should not use too much
data. It should also find recipes quickly. The app will be capable of unlimited search
queries.
6.4 Critical Components
The most important functions to test are the pantry management functions and the recipe
search functions. For most basic functionality, the app needs to store an inventory of
ingredients and find recipes to match them.
7.0 Risk Table
Risk:
Risk
Category:
Probability
of
Occurrence:
Impact
of Risk:
RMMM Action(s):
Platform
implementation
reveals added
complexity
Requirements
99+%
3
System context reassessed;
functions or classes may be
added or merged.
Text parse/OCR
Implementation
proves infeasible
under time
constraints
Tools, Skills
35%
2
Major functionality may need to
be removed or redesigned.
Data structures
insufficient for
required module
communication
Design
30%
3
Additional revisions of class
design will be necessary.
Methods
insufficient for
proper data
transformations
Design
30%
3
Additional methods or
refactoring may be required.
Alternate team
commitments
mandate reduced
collaboration time
Team,
Communication
65%
2-3
Adequate distribution of
workload can mitigate negative
effects. Tools such as email,
code repositories, and Dropbox
enhance communication in
absentia.
Chosen website
goes out of service
Tools, Resources
<5%
1
Entire interface with web host
must be redesigned.
Functionality must be restored.
Insufficient testing
fails to reveal flaws
Process
20%
2
Design tests more quickly and
enforce their application in the
development process.
IMPACT KEY:
4: Minor
3: Moderate
2: Severe
1: Catastrophic
Will not affect
product
release. May
result in
superficial
flaws but
functionality
intact.
May result in
bugs or
undesirable
performance.
Possible .
Major
functionality
affected
requiring major
effort to repair.
Product may not
meet release
deadline. Major
functionality will
be impacted and
potentially
removed.
8.0 Design Plan
8.1 First Release:
 All menu structures/methods implemented.
8.2 Second Release:
 Functions to manually add ingredients to the pantry will be implemented.
 Recipe search functionality will start being implemented.
8.3 Third Release:
 OCR will be implemented.
 Search will be finalized.
Download