Пример #1
0
        public static void AccountMenu(Checkings ca, Savings sa, Reserved rd)
        {
            Console.WriteLine(ca.balance);
            Console.WriteLine(sa.balance);
            Console.WriteLine(rd.balance);
            Console.WriteLine("\n Account Balance: ");
            Console.WriteLine("\n Checkings: " + ca.balance);
            Console.WriteLine("\n Savings: " + sa.balance);
            Console.WriteLine("\n Reserved: " + rd.balance);

            List <string> list = new List <string>();

            list.Add("\n\n Press 1 to: Checkings ");
            list.Add("\n Press 2 to: Savings ");
            list.Add("\n Press 3 to: Reserved ");
            list.Add("\n Press 4 to: Exit ");


            foreach (string currentVal in list)
            {
                Console.WriteLine(currentVal);
            }


            {
                int userNumb = int.Parse(Console.ReadLine());

                if (1 == userNumb)
                {
                    Checkings.caAccount(000, 000, ca.balance);
                }

                else if (2 == userNumb)
                {
                    Savings.saAccount(000, 000, sa.balance);
                }

                else if (3 == userNumb)
                {
                    Reserved.rdAccount(000, 000, rd.balance);
                }

                else if (4 <= userNumb)
                {
                    Console.WriteLine("\n Thank you for choosing safe one. Goodbye!");
                }
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            accountHolder user = new accountHolder();

            user.UserName    = "******";
            user.AccountNumb = "022872";

            Console.WriteLine("Hello " + user.UserName);

            Checkings ca = new Checkings(1290);
            Savings   sa = new Savings(80000);
            Reserved  rd = new Reserved(2500);


            accountHolder.AccountMenu(ca, sa, rd);
        }
Пример #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Which account would you like to access?");
            foreach (accountTypes types in Enum.GetValues(typeof(accountTypes)))
            {
                Console.WriteLine(types);
            }
            int UserInput = int.Parse(Console.ReadLine());

            switch (UserInput)
            {
            case 1:
                Console.WriteLine("Checking account information");
                Console.WriteLine("What would you like to do today\n 4.Deposit \n 5.Withdrawal");
                // Console.ReadLine();
                break;

            case 2:
                Console.WriteLine("Saving account information");
                Console.WriteLine("What would you like to do today\n 4.Deposit \n 5.Withdrawal");
                break;

            case 3:
                Console.WriteLine("Reserved account information");
                Console.WriteLine("What would you like to do today\n 4.Deposit \n 5.Withdrawal");
                Reserved mation = new Reserved();
                mation.Getinformatiion();
                Console.WriteLine("No Withdrawal for Reserve account. Will be penalize! ");
                break;
            }
            ;
            int UserInput1 = int.Parse(Console.ReadLine());

            switch (UserInput1)
            {
            case 4:
                Checking CheckDepositBank2 = new Checking();
                CheckDepositBank2.deposit();
                Accounts Info = new Accounts();
                Info.Reciept();
                break;

            case 5:
                Checking With = new Checking();
                With.Withdraw(100.00M);
                Accounts Info1 = new Accounts();
                Accounts inter = new Accounts();
                inter.AddInterests();
                Info1.Reciept();
                break;

            default:
                Console.WriteLine("invaild Response!");
                break;

                Accounts Info3 = new Accounts();

                Info3.Reciept();
                StreamWriter SW = new StreamWriter(@" Reciept.txt");

                Info3.Reciept();

                SW.WriteLine();
                SW.Close();
            }
        }