Docsity

Assignment for Software Design | CS 350, Assignments of Computer Science

Toggle sidebar
bg1
CS350/SE310 Software Design/Software Architcture I
Homework Assignment #2: Objectville Pizza Stores, Fall 2008
This is a two-part assignment with three due dates:
Part I: Tuesday Nov 18th, 11:59pm
Part II: Tuesday Nov 25th, 11:59pm
Final Submission: Tuesday Dec 2nd, 11:59pm
Your overall goal is to develop an ordering and accounting system for the chain stores of Objectville
Pizza, using Java. The customers do not know all of their requirements at the beginning, and the
requirements are given in two parts. This document contains the first part.
• This homework is supposed to be done *individually*.
• You are allowed to discuss your design with your classmates, but you have to implement it on your
own.
Grading Guidelines:
Everything will be graded as a whole in the end, but you still have to submit each part as required,
otherwise you will receive penalty in the end. Comments will be given along the way so that you can fix
your program before final submission. The following grading guidelines are for the final submission:
(1) Quality of design, which includes reasonable use of design patterns (40%):
a. The following patterns should be definitely applied: Abstract Factory, Strategy, Decorator,
Observer
b. The following patterns are optional: Builder, Singleton, Factory Method, and Prototype
c. Other patterns will be needed along the way.
(2) The completeness and correctness of the UML diagram (10%)
(3) The user should be able to order Pizza correctly using the system (30%)
(4) The user should be able to review the statistics of sale information (20%)
Requirement Part I:
Objectville Pizza has stores in New York and Chicago. These stores offer pizzas that are consistent with
local traditions. The software will be used in both stores. Objectville Pizza may also consider setting up a
new store in California in the future.
1. Pizzas from different areas differ in terms of the following basic ingredients:
a. Cheese: NY pizzas use ReggianoCheese, and Chicago Pizzas use MozzarellaCheese
b. Dough: NY pizzas use ThinCrustDough, and Chicago Pizzas use ThickCrustDough
c. Sauce: NY pizzas use MarinaraSauce, and Chicago Pizzas use PlumTomatoSauce
d. Clam: NY pizzas use FreshClam, and Chicago Pizzas use FrozenClam
2. Each Pizza store will offer the following four basic types of pizza:
a. Cheese Pizza, which contains sauce, cheese, and garlic
b. Veggie Pizza, which contains sauce, cheese, mushrooms, onion, red peppers
c. Clam Pizza, which contains sauce, cheese, and clam
d. Pepperoni Pizza, which contains sauce, cheese, mushrooms, pepperoni
pf2

Partial preview of the text

Download Assignment for Software Design | CS 350 and more Assignments Computer Science in PDF only on Docsity!

CS350/SE310 Software Design/Software Architcture I

Homework Assignment #2: Objectville Pizza Stores, Fall 2008

This is a two-part assignment with three due dates:

Part I: Tuesday Nov 18th, 11:59pm

Part II: Tuesday Nov 25th, 11:59pm

Final Submission: Tuesday Dec 2nd, 11:59pm

Your overall goal is to develop an ordering and accounting system for the chain stores of Objectville Pizza, using Java. The customers do not know all of their requirements at the beginning, and the requirements are given in two parts. This document contains the first part.

  • This homework is supposed to be done individually.
  • You are allowed to discuss your design with your classmates, but you have to implement it on your own.

Grading Guidelines: Everything will be graded as a whole in the end, but you still have to submit each part as required, otherwise you will receive penalty in the end. Comments will be given along the way so that you can fix your program before final submission. The following grading guidelines are for the final submission:

(1) Quality of design, which includes reasonable use of design patterns (40%): a. The following patterns should be definitely applied: Abstract Factory, Strategy, Decorator, Observer b. The following patterns are optional: Builder, Singleton, Factory Method, and Prototype c. Other patterns will be needed along the way. (2) The completeness and correctness of the UML diagram (10%) (3) The user should be able to order Pizza correctly using the system (30%) (4) The user should be able to review the statistics of sale information (20%)

Requirement Part I:

Objectville Pizza has stores in New York and Chicago. These stores offer pizzas that are consistent with local traditions. The software will be used in both stores. Objectville Pizza may also consider setting up a new store in California in the future.

  1. Pizzas from different areas differ in terms of the following basic ingredients: a. Cheese: NY pizzas use ReggianoCheese, and Chicago Pizzas use MozzarellaCheese b. Dough: NY pizzas use ThinCrustDough, and Chicago Pizzas use ThickCrustDough c. Sauce: NY pizzas use MarinaraSauce, and Chicago Pizzas use PlumTomatoSauce d. Clam: NY pizzas use FreshClam, and Chicago Pizzas use FrozenClam
  2. Each Pizza store will offer the following four basic types of pizza: a. Cheese Pizza, which contains sauce, cheese, and garlic b. Veggie Pizza, which contains sauce, cheese, mushrooms, onion, red peppers c. Clam Pizza, which contains sauce, cheese, and clam d. Pepperoni Pizza, which contains sauce, cheese, mushrooms, pepperoni
  1. The customer can also order different toppings to complement a basic pizza. The toppings include Pineapple, Meatball, Shrimp, and Tofu. The customer can order multiple toppings.
  2. The price of a pizza is determined by its size, type and toppings. Below is the cost factor table: Size Factor Type Factor Topping Factor Large: $10 Cheese Pizza: $5 Pineapple: $ Medium: $8 Veggie Pizza: $4 Meatball: $ Small: $5 Clam Pizza: $6 Shrimp: $ Pepperoni Pizza: $5 Tofu: $

For example, the price for a Large Veggie Pizza with two Pineapple toppings is $16. (In Objectville, everything is tax free!)

  1. The customer shall be able to order multiple pizzas, and the price should be calculated accordingly.
  2. The recipes for different types of pizza are different. We currently use the following recipes and we may develop new recipes later: a. Meat/Seafood Pizza recipe i. “cook the Meat/Seafood” ii. “Make dough” iii. “Put toppings on the dough” iv. “Bake for 35 minutes at 350” v. “Cut into 6 slices” b. Veggie Pizza recipe i. “Make dough” ii. “Put toppings on the dough” iii. “Bake for 20 minutes at 300” iv. “Cut into 6 slices”
  3. The receipt of an order should print the ingredients of each type of pizza, its recipe, the unit price and the total price.
  4. The software shall also provide statistic functions, including: a. Count how many pizzas are ordered in total b. Count how many pizzas are ordered for each of the four types of pizza c. Count how many pizza are ordered in each store (Hint: hope this reminds you Observer Pattern).

Part I Submission Guideline:

You need to submit the following three items to BbVista for Part I:

  1. A UML class diagram showing your design (in .pdf)
  2. A one-page essay explaining your design, e.g. which and how many patterns are used and why. (in .pdf)
  3. The source code that is consistent with your design. It is ok if it is not runnable when you submit the first part (you will get extra credits if it does!), but we have to run it by the end of the term.