static void Main(string[] args) { Ioperations accCurr = new Current(); Ioperations accSav = new Savings(); Ioperations accRecur = new Recurring(); accCurr.Deposit(); accCurr.Withdraw(); accCurr.Balance(); accSav.Deposit(); accSav.Withdraw(); accSav.Balance(); accRecur.Deposit(); accRecur.Withdraw(); accRecur.Balance(); Console.WriteLine("Hello World!"); }
static void Main(string[] args) { Account a1 = new Fixed("NISHI", "1", 10000, 2020, 5); Account a2 = new Savings("SAkIB", "2", 50000, 10); Account a3 = new SpecialSavings("NIDHI", "3", 20000, 5); Account a4 = new Overdraft("AKASH", "4", 150000, 20000); a1.Withdraw(500); a2.Withdraw(500); a3.Withdraw(500); a4.Withdraw(500); a1.Withdraw(5000); a2.Withdraw(40000); a3.Withdraw(6000); a4.Withdraw(10000); }
static void Main(string[] args) { Savings s1 = new Savings(); System.Console.Write("Savings"); s1.setSavings("Siddhi", "123", "Savings", 100); s1.displayBal(); s1.withdraw(50); s1.deposit(500); s1.calcInterest(); System.Console.WriteLine("\nCurrent"); Current c1 = new Current(); c1.setSavings("Siddhi", "123", "Savings", 5000); c1.displayBal(); c1.withdraw(50); c1.deposit(500); c1.penalty(); System.Console.ReadKey(); }
static void Main(string[] args) { String input; DOB dob = new DOB(); IDGENERATOR id = new IDGENERATOR(); Credit cr = new Credit(); Debit db = new Debit(); Savings sv = new Savings(); Bank bn = new Bank(); Console.WriteLine("**** Welcome to Bank Management System ***"); while (true) { Console.WriteLine("What you want to do:"); Console.WriteLine("0. Create account"); Console.WriteLine("1. Show account information"); Console.WriteLine("2. Deposit from account"); Console.WriteLine("3. Withdraw from account"); Console.WriteLine("4. Show all account with id"); Console.WriteLine("5. Clear screen"); Console.WriteLine("6. Exit"); object ob1 = Console.ReadLine(); input = Convert.ToString(ob1); //for 0-6 funtion calling if (input == "0") { Console.WriteLine("Enter account Type :"); bn.create_account(); } else if (input == "1") { Console.Write("Enter account Number :"); bn.showInfo(); } else if (input == "2") { Console.WriteLine("Enter Account Id: "); bn.deposit(); } else if (input == "3") { Console.WriteLine("Enter Account Id: "); bn.withdraw(); } else if (input == "4") { bn.showAll(); } else if (input == "5") { Console.Clear(); } else if (input == "6") { Environment.Exit(0); } Console.ReadKey(); } // Console.ReadKey(); }
static void Main(string[] args) { Console.WriteLine(); Console.WriteLine("\n"); Console.WriteLine(" Savings "); Console.WriteLine("\n"); Savings s1 = new Savings("JUI", "1234", 5000); Savings s2 = new Savings("MAHFUZA", "4321", 4000); s1.Withdraw(500); s1.Deposit(1000); s1.Transfer(1000, s2); s1.ShowInfo(); s2.ShowInfo(); Console.WriteLine(); Console.WriteLine("\n"); Console.WriteLine(" Special "); Console.WriteLine("\n"); SpecialCurrent sc1 = new SpecialCurrent("SHARMILI", "1234", 5000); SpecialCurrent sc2 = new SpecialCurrent("RINTY", "4321", 4000); sc1.Withdraw(500); sc1.Deposit(1000); sc1.Transfer(5000, sc2); sc1.ShowInfo(); sc2.ShowInfo(); Console.WriteLine(); Console.WriteLine("\n"); Console.WriteLine(" Fixed "); Console.WriteLine("\n"); Fixed f1 = new Fixed("HIA", "1234", 5000, 4); Fixed f2 = new Fixed("BRISTY", "4321", 4000, 3); f1.Withdraw(500); f1.Deposit(1000); f1.Transfer(5000, f2); f1.ShowInfo(); f2.ShowInfo(); Console.WriteLine(); Console.WriteLine("\n"); Console.WriteLine(" OverDraft "); Console.WriteLine("\n"); OverDraft od1 = new OverDraft("JUI", "1234", 5000); OverDraft od2 = new OverDraft("MAHFUZA", "4321", 4000); od1.Withdraw(500); od1.Deposit(1000); od1.Transfer(5000, od2); od1.ShowInfo(); od2.ShowInfo(); }
static void Main(string[] args) { //Client and account info AccountHolder client1 = new AccountHolder("Shell", "Company LLC.", "332-259-4667", "*****@*****.**"); Savings saving1 = new Savings(2000000000.0d, "108111264"); Checking checking1 = new Checking(1357000.0d, "246730001"); Console.SetCursorPosition((Console.WindowWidth / 4), 0); string makeTransaction = "yes"; do { //Bank name and menue display Console.WriteLine("THE CENTRAL BANK OF PANAMA TAX HAVEN"); Console.WriteLine("\n\n1. View Client Information"); Console.WriteLine("2. View Account Balance"); Console.WriteLine("3. Deposit Funds"); Console.WriteLine("4. Withdraw Funds"); Console.WriteLine("5. Exit"); //Asking the user to select a valid option Console.Write("\nSelect option number: "); int selection = int.Parse(Console.ReadLine()); while (selection < 1 || selection > 5) { Console.WriteLine("\nSelect a valid option: "); selection = int.Parse(Console.ReadLine()); } Console.WriteLine(); int subMenu; if (selection == 1) { //Display client information client1.ClientInformation(); Console.WriteLine("\nSavings account number: " + saving1.AccountNumber() + "\nBalance: " + saving1.GetBalance().ToString("C2")); Console.WriteLine("\nChecking account number: " + checking1.AccountNumber() + "\nBalance: " + checking1.GetBalance().ToString("C2")); makeTransaction = Transaction(); } else if (selection == 5) { //Exit if option 5 is selected Environment.Exit(0); } else { //Submenu Display Console.WriteLine("1. Checking\n2. Savings"); Console.Write("Select option number: "); } if (makeTransaction != "yes" || (selection > 1 && selection < 5)) { subMenu = int.Parse(Console.ReadLine()); while (subMenu < 1 || subMenu > 2) { Console.WriteLine("\nSelect a valid option: "); selection = int.Parse(Console.ReadLine()); } //Display balance if (selection == 2 && subMenu == 1) { Console.WriteLine("\nChecking account balance: " + checking1.GetBalance().ToString("C2")); makeTransaction = Transaction(); } else if (selection == 2 && subMenu == 2) { Console.WriteLine("\nSavings account balance: " + saving1.GetBalance().ToString("C2")); makeTransaction = Transaction(); } //New deposit else if (selection == 3 && subMenu == 1) { Console.WriteLine("How much would you like to deposit into checking today?"); double amount = double.Parse(Console.ReadLine()); checking1.Deposit(amount); Console.WriteLine(checking1.GetBalance().ToString("C2")); makeTransaction = Transaction(); } else if (selection == 3 && subMenu == 2) { Console.WriteLine("How much would you like to deposit into savings today?"); double amount = double.Parse(Console.ReadLine()); saving1.Deposit(amount); Console.WriteLine(saving1.GetBalance().ToString("C2")); makeTransaction = Transaction(); } //Withdrawal else if (selection == 4 && subMenu == 1) { Console.WriteLine("How much would you like to withdraw from checking today?"); double amount = double.Parse(Console.ReadLine()); checking1.Withdraw(amount); Console.WriteLine(checking1.GetBalance().ToString("C2")); makeTransaction = Transaction(); } else { Console.WriteLine("How much would you like to withdraw from savings today?"); double amount = double.Parse(Console.ReadLine()); saving1.Withdraw(amount); Console.WriteLine(saving1.GetBalance().ToString("C2")); makeTransaction = Transaction(); } } }while (makeTransaction == "yes"); }