// String Nume; // String Prenume; static void Main(string[] args) { // sbyte a = -127; // Exercise 1 course 2 Console.WriteLine("This is my first C# project."); //AbstractCar aCar = new AbstractCar(); //EngineStruct engine = new EngineStruct(); //Exercise 6 course 2 ICar car = new Mercedes(); AbstractCar car2 = new Mercedes(); // Exercise 7 slide 21 course 2 Mercedes _mercedes = new Mercedes(); Console.WriteLine("Mercedes is " + _mercedes.Description); Console.WriteLine("Mercedes costs " + _mercedes.Price); Console.WriteLine("Model " + _mercedes.Model); Console.WriteLine("Consum " + _mercedes.Consum); //Exercise 1 slide 10 course 3 Mercedes.StartEngine(); //Exercise 3 course 3 Mercedes m1 = new Mercedes(); m1.ShowRemainingNoOfKM(10, 7); //Exercise 2 course 3 double numberOfKM = m1.ShowRemainingNoOfKM(10, 7); Console.WriteLine(numberOfKM); //Exercise 4 slide 19 course 3 Mercedes m2 = new Mercedes(); m2.StartEngine(4); // Exercise 4 slide 21 course 3 double km = m2.CalculateConsumption(14); Console.WriteLine(km); Console.ReadKey(); string fizbuz = FizBuz.ShowFizBuz(15); Console.WriteLine("fizbuz"); PrintLogo(); PrintLogo(1); PrintLogo2(); }
// String Nume; // String Prenume; static void Main(string[] args) { // sbyte a = -127; // Exercise 1 course 2 Console.WriteLine("This is my first C# project."); //AbstractCar aCar = new AbstractCar(); //EngineStruct engine = new EngineStruct(); //Exercise 6 course 2 ICar car = new Mercedes(); AbstractCar car2 = new Mercedes(); // Exercise 7 slide 21 course 2 Mercedes _mercedes = new Mercedes(); Console.WriteLine("Mercedes is " + _mercedes.Description); Console.WriteLine("Mercedes costs " + _mercedes.Price); Console.WriteLine("Model " + _mercedes.Model); Console.WriteLine("Consum " + _mercedes.Consum); //Exercise 1 slide 10 course 3 Mercedes.StartEngine(); //Exercise 3 course 3 Mercedes m1 = new Mercedes(); m1.ShowRemainingNoOfKM(10, 7); //Exercise 2 course 3 double numberOfKM = m1.ShowRemainingNoOfKM(10, 7); Console.WriteLine(numberOfKM); //Exercise 4 slide 19 course 3 Mercedes m2 = new Mercedes(); m2.StartEngine(4); // Exercise 4 slide 21 course 3 double km = m2.CalculateConsumption(14); Console.WriteLine(km); string fizbuz = FizBuz.ShowFizBuz(15); Console.WriteLine("fizbuz"); Fruit fruct = new Fruit(); Console.WriteLine(fruct.GetCalories()); Apple apple = new Apple(); Console.WriteLine(apple.GetCalories()); Orange orange = new Orange(); Console.WriteLine(orange.GetCalories()); Ionatan ionatan = new Ionatan(); Console.WriteLine(ionatan.GetCalories()); //Apple a = new Ionatan(); //Console.WriteLine(a.GetCalories()); //Ionatan i = new Ionatan(); //Console.WriteLine(i.GetCalories()); //Fruit f = new Ionatan(); //Console.WriteLine(f.GetCalories()); Apple a = new Apple(); Ionatan i = new Ionatan(); Fruit f = new Fruit(); FruitBasket basket = new FruitBasket(); basket.addFruct(a); basket.addFruct(i); basket.addFruct(f); basket.displayFruitCalories(); Console.ReadKey(); PrintLogo(); PrintLogo(1); PrintLogo2(); }