Sol-Assignment14 - Food #customerName : String #foodName :...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Solution Dung Nguyen Assignment: 14 Due Date: December 04, 2009 Class Relationship Diagram:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Class Diagrams: Driver <<Main method>> + main(args : String[]) FoodCourt - restaurants : Restaurant[] <<Constructor>> +FoodCourt() +FoodCourt(restaurants : Restaurant []) <<operating methods>> +operate() +printOptions () Restaurant #name : String #restaurantName : String <<Constructor>> +Restaurant() + Restaurant (restaurantName : String) <<Get/Set Methods>> +getCustomerName() : String +setCustomerName(name : String) +getName() : String +setName(restaurantName : String) <<Operating methods>> +prepareMeal() : Food +compareTo(restaurant : Restaurant) : int Cheeburger <<Constructor>> + Cheeburger () + Cheeburger (restaurantName : String) <<operating methods>> + prepareMeal () : Burger
Background image of page 2
Subway <<Constructor>> + Subway () + Subway (restaurantName : String) <<operating methods>> + prepareMeal () : Sub
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Food #customerName : String #foodName : String &lt;&lt;Constructor&gt;&gt; +Food() +Food(foodName : String) &lt;&lt;Get/Set methods&gt;&gt; +getName() : String +setName(foodName : String) +getCustomerName() : String +setCustomerName(customerName : String) &lt;&lt;operating methods&gt;&gt; + prepareFood () Burger - pounds : double &lt;&lt;Constructor&gt;&gt; + Burger () + Burger (foodName : String) &lt;&lt;Get/Set methods&gt;&gt; +getPounds() : double +setPounds(pounds : double) &lt;&lt;operating methods&gt;&gt; +prepareMeal() +compareTo(burger : Burger) +consume() Sub - isVeggie : boolean &lt;&lt;Constructor&gt;&gt; +Sub() +Sub(foodName : String) &lt;&lt;Get/Set methods&gt;&gt; +getVeggie() : Boolean +setVeggie(isVeggie : boolean) &lt;&lt;operating methods&gt;&gt; +compareTo(sub : Sub) +consumes () &lt;&lt;Interfaces&gt;&gt; Consumable + consume() Grade: Class relationship diagram: 10 points Class diagram: 10 points Implementation: 10 points Minus: No staple: -2...
View Full Document

Page1 / 4

Sol-Assignment14 - Food #customerName : String #foodName :...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online