Beispiel #1
0
        public static void TestaaItemit()
        {
            Tech laptop = new Tech("Dell", 2017, 2300, "XPS 13", 13.3);

            Console.WriteLine("Kannettavan info:");
            Console.WriteLine(laptop.ToString());
            Console.WriteLine("");

            Tech phone = new Tech("Sony", 2015, 500, "Xperia Z5", 5.5);

            Console.WriteLine("Puhelimen info:");
            Console.WriteLine(phone.ToString());
            Console.WriteLine("");

            Movie movie1 = new Movie("Forrest Gump", 1994, 2, 144);

            Console.WriteLine("Elokuva 1:n info:");
            Console.WriteLine(movie1.ToString());
            Console.WriteLine("");

            Movie movie2 = new Movie("The Matrix", 1999, 3, 136);

            Console.WriteLine("Elokuva 2:n info:");
            Console.WriteLine(movie2.ToString());
            Console.WriteLine("");
        }