-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
33 lines (32 loc) · 1.14 KB
/
Program.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
using System;
namespace CourseWork
{
class Program
{
static void Main(string[] args)
{
ProxyUser user = new ProxyUser(0, "0000", new UsedUserState() );
user.LoadSave();
ATM atm = new ATM(user);
atm.AddToATM(new Banknote("Five Hundred Hrivnas", 500, new WithdrawDisplay()));
atm.AddToATM(new Banknote("Two Hundred Hrivnas", 200, new WithdrawDisplay()));
atm.AddToATM(new Banknote("One Hundred Hrivnas", 100, new WithdrawDisplay()));
atm.AddToATM(new Banknote("Fifty Hrivnas", 50, new WithdrawDisplay()));
atm.AddToATM(new Banknote("Twenty Hrivnas", 20, new WithdrawDisplay()));
atm.AddToATM(new Banknote("Ten Hrivnas", 10, new WithdrawDisplay()));
bool inMenu = user.Authenticate();
if (!inMenu)
{
user.State = new FailedUserState();
}
while (inMenu)
{
inMenu = atm.ShowMenu();
}
user.Save();
Console.Clear();
user.PrintCheck();
Console.ReadKey();
}
}
}