|
6 | 6 |
|
7 | 7 | namespace Prototype
|
8 | 8 | {
|
9 |
| -class Program |
10 |
| -{ |
11 |
| - static void Main(string[] args) |
| 9 | + class Program |
12 | 10 | {
|
13 |
| - SandwichMenu sandwichMenu = new SandwichMenu(); |
| 11 | + static void Main(string[] args) |
| 12 | + { |
| 13 | + SandwichMenu sandwichMenu = new SandwichMenu(); |
14 | 14 |
|
15 |
| - // Initialize with default sandwiches |
16 |
| - sandwichMenu["BLT"] = new Sandwich("Wheat", "Bacon", "", "Lettuce, Tomato"); |
17 |
| - sandwichMenu["PB&J"] = new Sandwich("White", "", "", "Peanut Butter, Jelly"); |
18 |
| - sandwichMenu["Turkey"] = new Sandwich("Rye", "Turkey", "Swiss", "Lettuce, Onion, Tomato"); |
| 15 | + // Initialize with default sandwiches |
| 16 | + sandwichMenu["BLT"] = new Sandwich("Wheat", "Bacon", "", "Lettuce, Tomato"); |
| 17 | + sandwichMenu["PB&J"] = new Sandwich("White", "", "", "Peanut Butter, Jelly"); |
| 18 | + sandwichMenu["Turkey"] = new Sandwich("Rye", "Turkey", "Swiss", "Lettuce, Onion, Tomato"); |
19 | 19 |
|
20 |
| - // Deli manager adds custom sandwiches |
21 |
| - sandwichMenu["LoadedBLT"] = new Sandwich("Wheat", "Turkey, Bacon", "American", "Lettuce, Tomato, Onion, Olives"); |
22 |
| - sandwichMenu["ThreeMeatCombo"] = new Sandwich("Rye", "Turkey, Ham, Salami", "Provolone", "Lettuce, Onion"); |
23 |
| - sandwichMenu["Vegetarian"] = new Sandwich("Wheat", "", "", "Lettuce, Onion, Tomato, Olives, Spinach"); |
| 20 | + // Deli manager adds custom sandwiches |
| 21 | + sandwichMenu["LoadedBLT"] = new Sandwich("Wheat", "Turkey, Bacon", "American", "Lettuce, Tomato, Onion, Olives"); |
| 22 | + sandwichMenu["ThreeMeatCombo"] = new Sandwich("Rye", "Turkey, Ham, Salami", "Provolone", "Lettuce, Onion"); |
| 23 | + sandwichMenu["Vegetarian"] = new Sandwich("Wheat", "", "", "Lettuce, Onion, Tomato, Olives, Spinach"); |
24 | 24 |
|
25 |
| - // Now we can clone the sandwiches. |
26 |
| - Sandwich sandwich1 = sandwichMenu["BLT"].Clone() as Sandwich; |
27 |
| - Sandwich sandwich2 = sandwichMenu["ThreeMeatCombo"].Clone() as Sandwich; |
28 |
| - Sandwich sandwich3 = sandwichMenu["Vegetarian"].Clone() as Sandwich; |
| 25 | + // Now we can clone the sandwiches. |
| 26 | + Sandwich sandwich1 = sandwichMenu["BLT"].Clone() as Sandwich; |
| 27 | + Sandwich sandwich2 = sandwichMenu["ThreeMeatCombo"].Clone() as Sandwich; |
| 28 | + Sandwich sandwich3 = sandwichMenu["Vegetarian"].Clone() as Sandwich; |
29 | 29 |
|
30 |
| - Console.ReadKey(); |
| 30 | + Console.ReadKey(); |
| 31 | + } |
31 | 32 | }
|
32 | 33 | }
|
33 |
| -} |
0 commit comments