The problem I have is that I can't seem to make a GUI pop up that ask for information on my choice.
For example, the one that requires you to input data like checking or saving and then process it.
Also, I believe there is no way to manipulate the yes/no option like making it checking or saving.
This was a homework but I already turned it in as it is but I still want to learn how to make this a GUI application.
Every time I try to do it I get all sorts of errors.
Thank for any help or idea of how to transfer this into GUI application. The code for account, checking and savings is stand alone so there is no need for changes there.
{ class Program { static void Main(string[] args) { { //Create the array of Acount Account[] MyAccount = new Account[2]; //Initialize accounts MyAccount[0] = new SavingsAccount(100m, .2m); MyAccount[1] = new CheckingAccount(100m, 2m); Console.WriteLine("Banking Application"); Console.WriteLine(""); //Display balances Console.WriteLine("Savings Acount Balance : $" + MyAccount[0].Balance.ToString()); Console.WriteLine("Checking Acount Balance : $" + MyAccount[1].Balance.ToString()); // processes account data ProcessAccount(MyAccount); string s; do{ do { Console.WriteLine("Another transaction? (Y = Yes; N = No)"); s = Console.ReadLine(); }while (s.ToUpper() != "Y" && s.ToUpper() != "N"); if(s.ToUpper ()=="Y") ProcessAccount(MyAccount); }while(s.ToUpper()=="Y"); Console.WriteLine(""); Console.WriteLine("Thank You for using our bank!"); Console.ReadLine(); } } //Extract Method: An operation of account private static void ProcessAccount(Account[] MyAccount) { string s; do { Console.WriteLine(""); Console.WriteLine("Please Select Deposit Or Withdraw……"); Console.WriteLine("Input '1' for Deposit or '2' for Withdraw"); s = Console.ReadLine(); } while (s != "1" && s != "2"); string s_amount; do { Console.WriteLine("Please Input Amount in numeric value"); s_amount = Console.ReadLine(); } while (!System.Text.RegularExpressions.Regex.IsMatch(s_amount, "^[0-9]*[1-9][0-9]*$")); decimal amount = decimal.Parse(s_amount); switch (s) { case "1": do { Console.WriteLine("Please Select Deposit Acount."); Console.WriteLine("1. Savings 2. Checking"); s = Console.ReadLine(); } while (s != "1" && s != "2"); switch (s) { case "1": MyAccount[0].Credit(amount); break; case "2": MyAccount[1].Credit(amount); break; } break; case "2": do { Console.WriteLine("Please Select Withdraw Acount."); Console.WriteLine("Input '1' for Savings or Input '2' for Checking"); s = Console.ReadLine(); } while (s != "1" && s != "2"); switch (s) { case "1": MyAccount[0].Debit(amount); break; case "2": MyAccount[1].Debit(amount); break; } break; } Console.WriteLine(""); Console.WriteLine("Savings Acount Balance : $" + MyAccount[0].Balance.ToString()); Console.WriteLine("Cheching Acount Balance : $" + MyAccount[1].Balance.ToString()); Console.WriteLine(""); } } }