-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b11151
commit bbd713a
Showing
1 changed file
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace problem1.UI | ||
{ | ||
class MenuUI | ||
{ | ||
|
||
public static void clearScreen() | ||
{ | ||
Console.WriteLine(); | ||
Console.Write(" Press any key to continue_"); | ||
Console.ReadKey(); | ||
Console.Clear(); | ||
Console.WriteLine(); | ||
} | ||
public static int menu() | ||
{ | ||
int option; | ||
Console.WriteLine(); | ||
Console.WriteLine("\t\t\t -------------------------------"); | ||
Console.WriteLine("\t\t\t | Ayesha's Coffee Shop |"); | ||
Console.WriteLine("\t\t\t -------------------------------"); | ||
Console.WriteLine(); | ||
Console.WriteLine(); | ||
Console.WriteLine(" -------------------------------"); | ||
Console.WriteLine(" | Select one option from menu |"); | ||
Console.WriteLine(" -------------------------------"); | ||
Console.WriteLine(); | ||
Console.WriteLine("\t 1. Add a menu item"); | ||
Console.WriteLine("\t 2. View the Cheapest item in menu"); | ||
Console.WriteLine("\t 3. View the Drinks menu"); | ||
Console.WriteLine("\t 4. View the Food menu"); | ||
Console.WriteLine("\t 5. Add order"); | ||
Console.WriteLine("\t 6. Fulfill the order"); | ||
Console.WriteLine("\t 7. View the order's List"); | ||
Console.WriteLine("\t 8. Total Payable amount"); | ||
Console.WriteLine("\t 9. Exit"); | ||
Console.WriteLine(); | ||
Console.Write(" Your Option: "); | ||
option = int.Parse(Console.ReadLine()); | ||
return option; | ||
} | ||
public static void displayOptionHeading(int option) | ||
{ | ||
Console.WriteLine(); | ||
if (option == 1) | ||
{ | ||
Console.WriteLine(" Add a menu item"); | ||
Console.WriteLine("----------------"); | ||
} | ||
if (option == 2) | ||
{ | ||
Console.WriteLine(" View the Cheapest item in menu"); | ||
Console.WriteLine("-------------------------------"); | ||
} | ||
if (option == 3) | ||
{ | ||
Console.WriteLine(" View the Drinks menu"); | ||
Console.WriteLine("---------------------"); | ||
} | ||
if (option == 4) | ||
{ | ||
Console.WriteLine(" View the Food menu"); | ||
Console.WriteLine("-------------------"); | ||
} | ||
if (option == 5) | ||
{ | ||
Console.WriteLine(" Add order"); | ||
Console.WriteLine("----------"); | ||
} | ||
if (option == 6) | ||
{ | ||
Console.WriteLine(" Fulfill the order"); | ||
Console.WriteLine("------------------"); | ||
} | ||
if (option == 7) | ||
{ | ||
Console.WriteLine(" View the order's list"); | ||
Console.WriteLine("----------------------"); | ||
} | ||
if (option == 8) | ||
{ | ||
Console.WriteLine(" Total Payable amount"); | ||
Console.WriteLine("---------------------"); | ||
} | ||
Console.WriteLine(); | ||
} | ||
} | ||
} |