Exemple #1
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();
        }
Exemple #2
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();
        }