Beispiel #1
0
        private static void Main(string[] args)
        {
            #region Main,,,

            // myMessage group
            var myMessage1 = "this is message 1";
            Console.WriteLine(myMessage1);

            // write and int
            var anInt = 61;
            Console.WriteLine(anInt);

            // use static MySimpleMath.Add funtion
            double simpleMath = MySimpleMath.Add(anInt, anInt);

            // use static MySimpleMath.Add override for an arrayee
            double[] numbers       = new double[] { 1, 2, 3, 42, 42154 };
            var      myAddOverRide = MySimpleMath.Add(numbers);
            Console.WriteLine(myAddOverRide);

            ChildBankAccount childBankAccount = new ChildBankAccount();
            childBankAccount.AddToBalance(100);
            var simpleMathMessage = Information(childBankAccount) + simpleMath;
            Console.WriteLine(simpleMathMessage);

            BankAccount bankAccount = new BankAccount();
            bankAccount.AddToBalance(100);
            Console.WriteLine(Information(bankAccount));

            MyInformation myInformation = new MyInformation();

            Console.WriteLine("Hello World!");

            #endregion Main,,,
        }
Beispiel #2
0
        static void Main()
        {
            //Console.WriteLine("Hello World!");

            //Console.WriteLine(SimpleMath.Add(34,23.5));

            //using overload
            double[] numbers = new double[] { 1, 2, 3, 43, 34553 };
            var      result  = SimpleMath.Add(numbers);

            Console.WriteLine(result);


            BankAccount bankAccount = new BankAccount();

            bankAccount.AddToBalance(100);
            Console.WriteLine(bankAccount.Balance);

            ChildBankAccount childBankAccount = new ChildBankAccount();

            childBankAccount.AddToBalance(30);
            Console.WriteLine(childBankAccount.Balance);

            //Using the interfaces
            SimpleMath simpleMath = new SimpleMath();

            Console.WriteLine(Information(bankAccount));
            Console.WriteLine(Information(simpleMath));
        }
Beispiel #3
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 #4
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 #5
0
        static void Main(string[] args)
        {
            ChildBankAccount bankAccount = new ChildBankAccount();

            bankAccount.AddToBalance(100);

            SimpleMath simpleMath = new SimpleMath();

            Console.WriteLine(Information(bankAccount));

            Console.ReadLine();
        }
Beispiel #6
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();
        }
Beispiel #7
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);
        }