-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFoodOrder.cs
34 lines (33 loc) · 977 Bytes
/
FoodOrder.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SWVerB
{
class FoodOrder
{
public string OrderName { get; set; }
public double VegOrders { get; set; }
public double MeatOrders { get; set; }
public double TotalPrice { get { return (MeatOrders * 31.99 + VegOrders * 23.99); } }
public FoodOrder()
{
OrderName = "";
VegOrders = 0;
MeatOrders = 0;
}
public FoodOrder(string ordername, double veggie, double meat)
{
OrderName = ordername;
VegOrders = veggie;
MeatOrders = meat;
}
public override string ToString()
{
string outputStr = "";
outputStr = OrderName + "," + VegOrders + "," + MeatOrders + "," + TotalPrice;
return outputStr;
}
}
}