Explain how you can make an object appear to change its behavior from one class
to another in a language like C++ or Java that does not allow dynamic typing.
Suppose that you have to develop some software for a local Pizza shop. It
allows customers to order their pizzas over the internet and collect them
(and pay) at the store. A Pizza has a price derived from its size, type,
and Toppings. A Pizza can have any number of Toppings. Toppings have
prices. Customers have Orders and each Order is for one Customer. An
Order is for a number Items, and has a collection time An Item is a Pizza
or a Drink, The shop has a number of Special Pizzas that have a name
(example "Hawaiian" ). Customers can order a Pizza by name or by listing
the toppings. The diagram should have at least half-a-dozen classes with
associations, some attributes, and some generalizations (correct UML 10
points, modeling the correct things 5 points, modeling the relations
between them 5 points).
- Draw a simple use case diagram showing three(3) likely use cases for the
local Pizza shop (10 points, UML 7 points, good names 3 points).
- Write a casual description of one(1) use case in your diagram. It should
have at least two scenarios. Number the steps! (10 points)
. . . . . . . . . ( end of section Use Case Models -- 20 points) <<Contents | End>>
Draw an SSD for one scenario in the casual format use case you wrote in the
previous question for the local Pizza shop (correct UML 10pts, correct
lifeline names (4 points), plausible message names 3 points, plausible
meaningful data 2 points).
. . . . . . . . . ( end of section Exam Questions from 2011) <<Contents | End>>