Are you gonna eat that
This design exercise is from the 224 exam, 2006. Bwahahahaha!
Requirements Statement
Some people are allergic to foods such as peanuts, gluten or lactose. Foods packages have labels that list ingredients, so that consumers can check that products are safe for them to eat. However, this can be a slow and difficult task. Gluten, for example, is found in wheat, barley, rye, and in products derived from them such as malt, vinegar, and thickeners. A shopper checking ingredients might overlook something, with potentially serious or fatal consequences.
Further, labels do not reveal all details of concern to consumers. For example, pesticides, animal products, and genetically engineered produce need not be declared, while products such as alcohol, toothpaste and shampoo are not covered by food labelling laws.
A new software system, `AreYouGonnaEatThat`? (AYGET), will help consumers to know what is in packaged foods and other common supermarket items. AYGET will run on mobile devices such as PDAs and cell phones. A user will be able to configure AYGET by defining a profile for each person it needs to consider. A profile will specify:
- The allergens or food aversions of concern.
- Safe thresholds for each problem ingredient, e.g. zero peanut content, and < 200 parts per million gluten.
When shopping, a user first selects the set of relevant profiles, e.g. family members, or dinner party guests. Thereafter, the user can check any product against the current set of profiles by supplying information that identifies the product, e.g. brand and product name.
On mobile devices with digital cameras, AYGET will allow the user to photograph bar codes. The software will use Optical Bar Code Recognition (OBCR) to extract bar code numbers, saving the user from having to type in product identification information.
AYGET company employees will maintain a central database of food information. Information supplied by manufacturers will be entered whenever food products are introduced or changed. The system will record details of food products, including name, manufacturer (with contact information), brand, visible characteristics of each kind of package (e.g. size, colour), and bar codes. Ingredients and their amounts will be stored, of course. All known types of allergen and food aversions will be defined, and ingredients will be classified by the presence of these constituents.
Each AYGET installation (e.g. on a mobile phone) will keep a local copy of the whole database. Whenever the user chooses, the latest data can be downloaded from the central server. The server is not accessed at other times, and no personal configuration data is sent from client installations to the central database.
Question
Draw a UML class diagram suitable for a requirements specification of this system. Your diagram should correspond as closely as possible to the level of detail given in the description above, making reasonable deductions and assumptions. Include relationship multiplicity information, and any attributes and operations that are evident (or can reasonably be deduced) from the description.