static String[] drinks = { "Water", "Coffee", "Milkshake", "Soda" };
static double[] drinksP = { 0.00, 5.00, 8.00, 3.50 };
static String[] drinks2 = { "Water", "Wine", "Beer", "Coffee", "Milkshake", "Soda" };
static double[] drinks2P = { 0.00, 12.50, 10.00, 5.00, 8.00, 3.50 };
static String[] foodL = { "Hamburger", "Ramen", "Tacos", "Soup" };
static double[] foodLP = { 15.00, 11.50, 16.50, 9.50 };
static String[] foodD = { "Pasta", "Salmon", "Steak", "Chicken" };
static double[] foodDP = { 18.50, 17.00, 25.00, 15.50 };
static void Main(string[] args)
Console.WriteLine("Do you want lunch(0) or dinner(1)?");
int options = int.Parse(Console.ReadLine());
String[] o = new string[0];
double[] p = new double[0];
Restaurant r1 = new Restaurant("Hanny's Diner", 22, drinks, o, drinksP, p);
r1.drinkprices = drinks2P;
Console.WriteLine("Enter drink #: ");
int dN = int.Parse(Console.ReadLine());
Console.WriteLine("Enter food #: ");
int fN = int.Parse(Console.ReadLine());
double sum = r1.foodprices[fN] + r1.drinkprices[dN];
Console.WriteLine("Time to pay!!\nEnter your money: ");
double money = int.Parse(Console.ReadLine());
Console.WriteLine("Payment Secured!");
Console.WriteLine("Recipt\n-----------------------------");
Console.WriteLine($"{r1.drinkmenu[dN]} {r1.drinkprices[dN], 18:C} ");
Console.WriteLine($"{r1.foodmenu[fN]} {r1.foodprices[fN], 18:C} ");
Console.WriteLine("-----------------------------");
Console.WriteLine($" Total: {sum:C}");
Console.WriteLine($" Amount Paid: {money:C}");
Console.WriteLine($" Change: {money-sum:C}");
Console.WriteLine("Payment Denied - not enough money :(");
static bool pay(double money, double price)
internal class Restaurant
private string[] drinkMenu;
private string[] foodMenu;
private double[] drinkPrices;
private double[] foodPrices;
public Restaurant(string name, int age, string[] drinkMenu, string[] foodMenu, double[] drinkPrices, double[] foodPrices)
this.drinkMenu = drinkMenu;
this.foodMenu = foodMenu;
this.drinkPrices = drinkPrices;
this.foodPrices = foodPrices;
public Restaurant(int age, string[] drinkMenu, string[] foodMenu, double[] drinkPrices, double[] foodPrices) : this("Diner", age, drinkMenu, foodMenu, drinkPrices, foodPrices)
this.drinkMenu = drinkMenu;
this.foodMenu = foodMenu;
this.drinkPrices = drinkPrices;
this.foodPrices = foodPrices;
Console.WriteLine("Hello, welcome to " + name + ", what would you like to order?");
Console.WriteLine("Drink Menu\n");
for (int i = 0; i < drinkMenu.Length; i++)
Console.WriteLine($"{i}) {drinkMenu[i]} {drinkPrices[i]:C}");
Console.WriteLine("Food Menu\n");
for (int i = 0; i < foodMenu.Length; i++)
Console.WriteLine($"{i}) {foodMenu[i]} {foodPrices[i]:C}");
private set { foodMenu = value; }
public double[] foodprices
get { return foodPrices; }
private set { foodPrices = value; }
public string [] drinkmenu
public double[] drinkprices