Beispiel #1
0
        public void Problem2()
        {
            Console.WriteLine("Which TV are you considering? Please enter '1' for the HDTV, and '2' for the 4K TV. Then press 'Enter'");
            int myTV = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine(" ");

            if (myTV == 1)
            {
                Console.WriteLine("You have chosen the HDTV model. With this model, the specs are: ");
                Console.WriteLine("----------------------------------------------------------------");
                HDTV myHD = new HDTV("80 inches", "900.00");
                myHD.Mounty(false);
                myHD.TurnOn();
                myHD.SmartApp();
                Console.WriteLine("However, this model does have " + myHD.ports + " ports available for your needs.");
            }

            else if (myTV == 2)
            {
                Console.WriteLine("You have chosen the 4K TV model. With this model, the specs are: ");
                Console.WriteLine("----------------------------------------------------------------");
                FKTV myFK = new FKTV("100 inches", "3000.00");
                myFK.Mounty(true);
                myFK.TurnOn();
                myFK.SmartApp();
                Console.WriteLine("Finally, this model has " + myFK.ports + " ports available for your needs.");
            }

            else
            {
                Console.WriteLine("You did not enter a valid option. Please start over.");
            }
        }
Beispiel #2
0
        public void Question2()
        {
            int  ports = 5;
            HDTV hDTV  = new HDTV("$700.00", "65 Inch");

            hDTV.TurnOn();
            hDTV.Mountability(true);
            Console.WriteLine("There are " + hDTV.ports + " ports available on this device.");

            LKTV lKTV = new LKTV("$1250.00", "75\"");

            lKTV.Mountability(true);
            lKTV.TurnOn();
            lKTV.SmartApp();
            Console.WriteLine("There are " + ports + " ports available on this device.");
        }