public static void Main()
Console.WriteLine("Hello! Welcome to your checking and savings account program!");
Console.WriteLine("How much is in your checking account?");
int checkingBalance = int.Parse(Console.ReadLine());
Console.WriteLine("How much is in your savings account?");
int savingsBalance = int.Parse(Console.ReadLine());
BankAccount Checking = new BankAccount("Checking", checkingBalance);
BankAccount Savings = new BankAccount("Savings", savingsBalance);
Console.WriteLine("How much would you like to save?");
while(!Transfer.Save_Money(Checking, Savings))
Transfer.SaveMoney(Checking, Savings);
if(Checking.transferAmount())
Console.WriteLine(" Your checking total is " + Checking.getBalance());
Console.WriteLine(" Your checking total is ");
public static void SaveMoney(BankAccount checking, BankAccount savings)
int transferAmount = Int32.Parse(Console.ReadLine());
checking.setBalance(transferAmount);
savings.setBalance(transferAmount);
Console.WriteLine("You have " + checking.getBalance() + " in your checking account.");
Console.WriteLine("You have " + savings.getBalance() + " in your savings account.");
Console.WriteLine("Would you like to make another deposit?");
answer = Console.ReadLine();
Console.WriteLine("You have " + checking.getBalance() + " in your checking account.");
Console.WriteLine("You have " + savings.getBalance() + " in your savings account.");
public static Boolean Save_Money(BankAccount Checking, BankAccount Savings)
if(Checking.transferAmount())
private string AccountType;
public BankAccount(string _accounttype, int _balance)
this.AccountType = _accounttype;
public string getAccount_Type()
public void setBalance(int transferAmount)
this.balance -= transferAmount;
public Boolean transferAmount()