public int Deposit (int x)
public int Withdraw (int y)
Console.WriteLine("Current balance is {0}", balance);
public bool isBalanceEnoughForWithdrawal(int withdrawal){
return (balance - withdrawal >= 0) ;
public static void Main()
string deposit_action = "";
Console.WriteLine("Yurr! Welcome to the bank! How many accounts you wanna open?\n");
int accsTotal = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("You wanna open {0} accounts\n", accsTotal);
string[] accs = new string [accsTotal];
int displayCounter = counter + 1;
for (counter = 0 ; counter < accsTotal; counter++)
Console.WriteLine("Enter name of account # {0}\n", displayCounter);
accs[counter] = Console.ReadLine();
Console.WriteLine("You Entered {0} as the account name\n",accs[counter]);
Console.WriteLine("What would you like to do with {0} account? \n\n1 for Deposit. 2 for Withdraw. 3 to display balance.\n\n4 to Exit.", accs[counter]);
int action = Convert.ToInt32(Console.ReadLine());
Account user = new Account();
while (deposit_action != "Yes")
Console.WriteLine("How much do you want to deposit?");
int deposit = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("You desposited {0}", deposit);
Console.WriteLine("Your balance is now {0}", user.GetBal());
Console.WriteLine("All done with deposit? Type 'Yes' if so");
deposit_action = Console.ReadLine();
Console.WriteLine("How much do you want to deposit?");
int withdrawal = Convert.ToInt32(Console.ReadLine());
user.Withdraw(withdrawal);
Console.WriteLine("You withdrew {0}",withdrawal);
Console.WriteLine("You can't withdraw more than you currently have");
Console.WriteLine("All done with this withdrawing? Type 'Yes' if so");
deposit_action = Console.ReadLine();
Console.WriteLine("Your balance is now {0}", user.GetBal());
Console.WriteLine("All done with this account");