Example #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!");
                }
            }
        }
Example #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);
        }