Beispiel #1
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            BankAccount bankAccount1 = new BankAccount(1222.33f, "Haitn");

            Console.WriteLine(bankAccount1.Balance);

            BankAccount bankAccount2 = new BankAccount(1333.33f, "tnHai");

            ChildBankAccount bankAccount3 = new ChildBankAccount(1333.33f, "tnHai", "Haitn");

            Console.WriteLine(bankAccount1.AddBalance(1000f));
            Console.WriteLine(bankAccount2.AddBalance(-2000f));
            Console.WriteLine(bankAccount2.AddBalance(-2000f, true));
            Console.WriteLine(bankAccount3.Parent);

            am = new AdvancedMath();
            Console.WriteLine(am.Remainder(7, 3));

            //using asynchronouns method
            GetData();

            Console.ReadLine();
        }
Beispiel #2
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();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Console.WriteLine(SimpleMath.Division(432.23f, 54523.2f));

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

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

            Console.WriteLine(bankAccount1.AddBalance(100f));
            Console.WriteLine(bankAccount2.AddBalance(100f));

            Console.ReadLine();
        }
Beispiel #4
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);
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            Console.WriteLine(SimpleMath.Add(23.4f, 23.4f));


            //defines an object "creates a new instance"
            //creates the bank accounts and then gives them values.
            //I am using the BankAccount class to hold data for different people.
            BankAccount bankAccount1 = new BankAccount(100f, "Joshua Johnson");

            //gets the balance prior to "AddBalance"
            Console.WriteLine(bankAccount1.Balance);

            BankAccount bankAccount2 = new BankAccount(50f, "Jaclyn Johnson");


            //adds money to the bankAccount(s) using the AddBalance bethod.
            Console.WriteLine(bankAccount1.AddBalance(100f));
            Console.WriteLine(bankAccount2.AddBalance(-2100f));


            Console.ReadLine();
        }