static void Main(string[] args) { MyMath result1 = new MyMath(); result1.Multiply(2, 3); Console.WriteLine("The result is: " + result1.getResult()); result1.Divide(2, 3); Console.WriteLine("The result is: " + result1.getResult()); result1.Add(2, 3); Console.WriteLine("The result is: " + result1.getResult()); result1.Subtract(2, 3); Console.WriteLine("The result is: " + result1.getResult()); }
static void GetResult(string[] args) //{ // MyMath mathproblem1 = new MyMath(); // MyMath mathproblem2 = new MyMath(); // mathproblem1.operand1 = 2; // mathproblem1.operand2 = 2; // mathproblem1.result = 0; // mathproblem1.GetResult(); // Console.WriteLine(mathproblem1.GetResult()); { MyMath myFirstCar = new MyMath(); MyMath mySecondCar = new MyMath(); MyMath myThirdCar = new MyMath(); myFirstCar.operand1 = 2; myFirstCar.operand2 = 2; myFirstCar.result = 280; myFirstCar.setResult(280); //myFirstCar.speedUp(); //myFirstCar.speedUp(); Console.WriteLine(myFirstCar.getResult()); //for (int i = 0; i <= 200; i++) //{ // myFirstCar.speedUp(); //} myFirstCar.ToString(); }