예제 #1
0
 // Inheritance challenge 1
 public static void PlayVideoPost()
 {
     Section9Repository.VideoPost videoPost1 = new Section9Repository.VideoPost("This is a video post", true, "RIP-Vine", "www.theinternet.com/video.mpeg", 100);
     videoPost1.Play();
     Console.WriteLine("Press any key to stop video");
     Console.ReadKey();
     videoPost1.Stop();
 }
예제 #2
0
        public static void CreatePosts()
        {
            Section9Repository.Post post1 = new Section9Repository.Post("This is a basic post", true, "ProgrammingNoob");
            Console.WriteLine(post1.ToString());

            Section9Repository.ImagePost imagePost1 = new Section9Repository.ImagePost("This is an image post", true, "InstagramHusband", "www.theinternet.com/image.jpg");
            Console.WriteLine(imagePost1.ToString());

            Section9Repository.ImagePost imagePost2 = new Section9Repository.ImagePost();
            Console.WriteLine(imagePost2.ToString());

            Section9Repository.VideoPost videoPost1 = new Section9Repository.VideoPost("This is a video post", true, "RIP-Vine", "www.theinternet.com/video.mpeg", 100);
            Console.WriteLine(videoPost1.ToString());
        }