-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrderProcessor.cs
More file actions
32 lines (29 loc) · 856 Bytes
/
OrderProcessor.cs
File metadata and controls
32 lines (29 loc) · 856 Bytes
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SDP_Project
{
abstract class OrderProcessor
{
protected Order order;
protected Restaurant restaurant;
public OrderProcessor(Order order, Restaurant restaurant)
{
this.order = order;
this.restaurant = restaurant;
}
public abstract double CalculateDeliveryPrice();
public virtual double CalculatePrice()
{
double total = CalculateDeliveryPrice();
total += order.Amount;
return total;
}
public abstract List<OrderItem> SelectItems();
public abstract bool ValidateOrder();
public abstract void ProcessOrder();
public abstract void DeliverOrder();
}
}