static void Main(string[] args) { int UserId; int Pin; int Counter = 0; double amount; Console.WriteLine("Welcome"); do { Console.Write("Enter Account Number: "); UserId = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter Pin: "); Pin = Convert.ToInt32(Console.ReadLine()); if (CheckCredentials(UserId, Pin)) { Success = true; break; } else { Counter++; } } while (Counter <= 3); if (Success) { Account acc = new Account(UserId, Pin, balance); Console.WriteLine("Login Successful"); Boolean exit = false; do { Console.WriteLine(acc.ToString()); Console.WriteLine("Choose one of the following options: D-Depoist, W-Withdraw, U-Update Pin, T- Transactions or E-Exit"); char option = Convert.ToChar(Console.ReadLine()); switch (char.ToUpper(option)) { case 'E': exit = true; break; case 'W': Console.WriteLine("Enter amount to withdraw: "); amount = Convert.ToDouble(Console.ReadLine()); acc.Withdraw(amount); WriteTransaction('W', amount, acc.AccountNumber); break; case 'D': Console.WriteLine("Enter amount to deposit: "); amount = Convert.ToDouble(Console.ReadLine()); acc.Deposit(amount); WriteTransaction('D', amount, acc.AccountNumber); break; case 'U': Console.WriteLine("Enter new pin:"); acc.UpdatePin(Convert.ToInt32(Console.ReadLine())); break; case 'T': PrintTransactions(acc.AccountNumber); break; default: Console.WriteLine("Invalid option, try again!"); break; } } while (!exit); UpdateServer(acc); Console.WriteLine("Server updated\r\nSession Closed"); Console.ReadKey(); } else { Console.WriteLine("Login Unsuccessful"); } }