Beispiel #1
0
        public void ExecutorForPostInheritance()
        {
            Post post1 = new Post("Thanks for the birthday wishes", true, "Kumar Raju");

            Console.WriteLine(post1.ToString());

            //B b = new B();
            //Console.ReadKey();

            VideoPost videoPost = new VideoPost("Intro video", "https:/video1.mkv",
                                                10, "User5", true);

            videoPost.Play();
            Console.WriteLine("Press any key to stop playing");
            Console.ReadKey();
            videoPost.Stop();
            Console.ReadKey();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Post post1 = new Post("Thanks for the birthday wishes", true, "Fabio C");

            Console.WriteLine(post1.ToString());
            ImagePost imagePost1 = new ImagePost("Check out my new shoes", "Fabio C",
                                                 "https://images.com/shoes", true);

            VideoPost video1 = new VideoPost("Art of programming", true, "Master programmer",
                                             "https://youtube.com/watch?v=gfd3443gY", 30);

            Console.WriteLine(imagePost1.ToString());
            Console.WriteLine(video1.ToString());

            video1.Play();
            Console.WriteLine("Press any key to stop the video!");
            Console.ReadKey();
            video1.Stop();

            Console.ReadKey();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Post post1 = new Post("Thanks for the birthday wishes", true, "Denis Panjuta");

            Console.WriteLine(post1.ToString());

            ImagePost imagePost1 = new ImagePost("Check out my new shoes", "Denis Panjuta",
                                                 "https://images.com/shoes", true);

            VideoPost videoPost1 = new VideoPost("FailVideo", "Denis Panjuta",
                                                 "https://video.com/failvideo", true, 10);

            Console.WriteLine(imagePost1);
            Console.WriteLine(videoPost1.ToString());

            videoPost1.Play();
            Console.WriteLine("Press any key to stop the video!");
            Console.ReadKey();
            videoPost1.Stop();
            Console.ReadLine();
        }