예제 #1
0
        static void Main(string[] args)
        {
            //This would call the class that did math and do it with floats.
            Console.WriteLine("Subtracted Number equal " + Simplemath.Add(432.23f, 54523.3f));
            Console.WriteLine("Subtracted Number equal " + Simplemath.Subtract(432.23f, 54523.3f)); //n1, n2));
            Console.WriteLine("Multiplied Number equal " + Simplemath.multiply(432.23f, 54523.3f)); //n1, n2));
            Console.WriteLine("Divided Number equal " + Simplemath.divide(432.23f, 54523.3f));      //n1, n2));*/

            //This would get the remainer of two numbers.
            Advancemath am = new Advancemath();

            Console.WriteLine(am.Remainer(7, 3));
            Console.ReadLine();

            //This was to create an adult and child bank account object
            BankAccount bankaccount1 = new BankAccount(124321.32f, "Jane Doe");

            Console.WriteLine(bankaccount1.Balance);
            ChildBankAccount bankaccount2 = new ChildBankAccount(1342.32f, "John Doe", "Jane Doe");

            //This would change the values of the bank accounts.
            Console.WriteLine(bankaccount1.AddBalance(100f));
            Console.WriteLine(bankaccount2.AddBalance(-1421.43f, true));

            Console.ReadLine();

            //This would call a class to get information about the bank accounts
            GetData();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine(SimpleMath.Division(432.23f, 54523.2f));

            BankAccount bankAccount1 = new BankAccount(124321.32f, "Jane Doe");

            Console.WriteLine(bankAccount1.Balance);

            ChildBankAccount bankAccount2 = new ChildBankAccount(1321.43f, "John Doe", "Jane Doe");

            Console.WriteLine(bankAccount1.AddBalance(100f));
            Console.WriteLine(bankAccount2.AddBalance(-1421.43f, true));

            Console.ReadLine();
        }
예제 #3
0
        static void Main(string[] args)
        {
            //var huh = new SimpleMath();
            //huh.Add(2, 3);

            double[] numbers = new double[] { 1, 2, 30, 123, 4002 };
            var      result  = SimpleMath.Add(12, 34);

            Console.WriteLine(result);

            var bank = new BankAccount(1000);

            bank.AddBalance(100);

            Console.WriteLine(bank.Balance);

            var child = new ChildBankAccount();

            child.AddBalance(10);
            Console.WriteLine(child.Balance);
        }