-
Notifications
You must be signed in to change notification settings - Fork 0
/
OrderItem.cs
65 lines (53 loc) · 1.21 KB
/
OrderItem.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
using System;
using System.Collections.Generic;
using System.Text;
namespace PizzaOrderingSystem
{
public abstract class OrderItem
{
private string size;
public string Size
{
get
{
return size;
}
}
private string type;
public string Type
{
get
{
return type;
}
}
private int quantity;
public int Quantity
{
get
{
return quantity;
}
}
private static readonly string[] sizeChoice = { "Small", "Medium", "Large" };
public string[] SizeChoice
{
get
{
return sizeChoice;
}
}
public OrderItem()
{
}
public OrderItem(string size, string type, int quantity)
{
this.size = size;
this.quantity = quantity;
this.type = type;
}
public abstract string ObtainSize(int choice);
public abstract string ObtainType(int choice);
public abstract double ComputePricePerUnit();
}
}