Beispiel #1
0
        static void Main(string[] args)
        {
            //StringBuilder manipula textos
            Coment coment1 = new Coment("Have a nice trip");
            Coment coment2 = new Coment("Wow That's awesome!");

            Post p1 = new Post(
                DateTime.Parse("21/06/2018 13:05:44"),
                "Travalling to New Zealand",
                "I am going to visit this wonderful country",
                12);

            p1.AddComent(coment1);
            p1.AddComent(coment2);

            Coment coment3 = new Coment("Good night");
            Coment coment4 = new Coment("May the force be with you");

            Post p2 = new Post(
                DateTime.Parse("28/07/2018 2:14:19"),
                "Good night guys",
                "See you tomorrow",
                5);

            p2.AddComent(coment3);
            p2.AddComent(coment4);

            Console.WriteLine(p1);
            Console.WriteLine(p2);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Comment c1 = new Comment("Have a nice trip!!!");
            Comment c2 = new Comment("Wow, that's awesome");

            Post p1 = new Post(
                DateTime.Parse("21/05/2018 13:05:44"),
                "traveling to New Zeland",
                "I'm going to visit this wonderful country",
                12);

            p1.AddComent(c1);
            p1.AddComent(c2);

            Comment c3 = new Comment("Good Night...");
            Comment c4 = new Comment("May the force be wuth you");

            Post p2 = new Post(
                DateTime.Parse("28/07/2018 23:14:19"),
                "Good night guys",
                "See you tomorrow",
                5
                );

            p2.AddComent(c3);
            p2.AddComent(c4);

            Console.WriteLine(p1);
            Console.WriteLine(p2);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Coment c1 = new Coment("Have a nice strip");
            Coment c2 = new Coment("Wow that's awesome!");

            Post p1 = new Post(
                DateTime.Parse("21/6/2018 13:05:44"),
                "Traveling to new Zealand",
                "I'm going to visit this wonderfaul country",
                12
                );

            p1.AddComent(c1);
            p1.AddComent(c2);

            Coment c3 = new Coment("Good night");
            Coment c4 = new Coment("May the Force be with you");

            Post p2 = new Post(
                DateTime.Parse("28/6/2018 13:05:44"),
                "Good night guys",
                "See you tomorrow",
                5
                );

            p2.AddComent(c3);
            p2.AddComent(c4);

            Console.WriteLine(p1);
            Console.WriteLine(p2);
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Comments c1 = new Comments("Have a nice Trip!");
            Comments c2 = new Comments("Wow thats awesome!");
            Post     p1 = new Post(DateTime.Parse("21/06/2018 13:05:44"),
                                   "Traveling to New Zealand",
                                   "I'm going to visit this wonderful country!",
                                   12);

            p1.AddComent(c1);
            p1.AddComent(c2);

            Console.WriteLine(p1);
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            //dois comentários
            Comment c1 = new Comment("Que legal!!");
            Comment c2 = new Comment("Bacana, divirta-se!!!");


            Post p1 = new Post(DateTime.Parse("12/12/2020 12:32:38"),
                               "viajando para nova zelândia",
                               12, "Vou visitar o pais mais maravilhoso");

            p1.AddComent(c1);
            p1.AddComent(c2);
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            DateTime date    = new DateTime(2018, 06, 21, 13, 05, 44);
            string   title   = "Traveling to New Zealand";
            string   content = "I'm going to visit this wonderful country!";
            int      likes   = 12;

            Post post1 = new Post(date, title, content, likes);

            post1.AddComent("Have a nice trip");
            post1.AddComent("Wow That's awsome!");

            Console.WriteLine(post1.Title);
            Console.WriteLine(post1.Likes + " Likes - " + post1.Moment);
            Console.WriteLine(post1.Content);
            Console.WriteLine("Comments:");
            foreach (Comment x in post1.comments)
            {
                Console.WriteLine(x.Text);
            }
            Console.WriteLine("");

            date    = new DateTime(2018, 08, 28, 23, 14, 19);
            title   = "Good night guys";
            content = "See you tomorrow";
            likes   = 5;
            Post post2 = new Post(date, title, content, likes);

            post2.AddComent("Good night");
            post2.AddComent("May the force be with you");
            Console.WriteLine(post2.Title);
            Console.WriteLine(post2.Likes + " Likes - " + post2.Moment);
            Console.WriteLine(post2.Content);
            Console.WriteLine("Comments:");
            foreach (Comment x in post2.comments)
            {
                Console.WriteLine(x.Text);
            }
        }
Beispiel #7
0
        static void Main(string[] args)
        {
            Comment c1 = new Comment("Have a nice trip!");
            Comment c2 = new Comment("Wow that's awesome!");
            Post    p1 = new Post(
                DateTime.Parse("21/06/2018 13:05:44"),
                "Traveling to New Zealand",
                "I'm going to visit this wonderful country!",
                12);

            p1.AddComent(c1);
            p1.AddComent(c2);

            Comment c3 = new Comment("Good night");
            Comment c4 = new Comment("May the Force be with you");
            Post    p2 = new Post(
                DateTime.Parse("28/07/2018 23:14:19"),
                "Good night guys",
                "See you tomorrow",
                5);

            p2.AddComent(c3);
            p2.AddComent(c4)
        }