-
Notifications
You must be signed in to change notification settings - Fork 74
/
Program.cs
66 lines (46 loc) · 1.98 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using FoodDeliveryApp.FoodDeliveryAppModel;
using FoodDeliveryApp.RestaurantSearch;
using System;
using FoodDeliveryApp.FoodDeliveryDriver;
namespace FoodDeliveryApp
{
class Program
{
static void Main(string[] args)
{
#region User Searches Restaurant
//User Searches Restaurant.
RestaurantSearchDriver restaurantSearchDriver = new RestaurantSearchDriver();
var restaurantId = restaurantSearchDriver.RestaurantSearch();
#endregion
#region User Sees Food Menu
//User sees Food Menu Items based on the selected Restaurant Id.
MealMenuIteratorDriver mealMenuIteratorDriver = new MealMenuIteratorDriver();
var foodMenu = mealMenuIteratorDriver.PrintMealMenu(restaurantId);
#endregion
#region User Selects Meal
//Meal Selector.
MealSelectorDriver mealSelectorDriver = new MealSelectorDriver();
var selectedMealItems = mealSelectorDriver.MealSelectionbyUser(foodMenu);
#endregion
#region Restaurant Builds Meal
//Calling Meal Builder
MealBuilderDriver mealBuilderDriver = new MealBuilderDriver();
var totalCost = mealBuilderDriver.BuildMealForUser(selectedMealItems);
#endregion
#region User Orders Food
//Order Food
string orderId = string.Empty;
UserModel user = null;
MealOrderDriver mealOrderDriver = new MealOrderDriver();
var cancel = mealOrderDriver.MealOrderByUser(selectedMealItems, totalCost, restaurantId, out orderId, out user);
#endregion
#region User Tracks Order
//Order Tracking.
OrderTrackingDriver orderTrackingDriver = new OrderTrackingDriver();
orderTrackingDriver.OrderTrackingByUser(restaurantId, orderId, user, cancel);
#endregion
Console.ReadKey();
}
}
}