// Methods public static void Main() { Console.OutputEncoding = System.Text.Encoding.UTF8; BlogPost blogPost = new BlogPost( title: "10 Reasons to go Vegan", description: "Discussion of Health and Moral Reasoning for Veganism", created: DateTime.Now ); //BlogPost blogPost = new BlogPost("10 Reasons to go Vegan", "Discussion of Health and Moral Reasoning for Veganism", DateTime.Now); Console.WriteLine(">>>Blog Post Voting<<<"); Console.WriteLine(blogPost.BlogSummary()); while (!_endVoting && _command != "exit") { //Console.Clear(); // Display Blog Post //Console.WriteLine(">>>Blog Post Voting<<<"); Console.Write("Please enter a command (star, unstar or exit): "); _command = Console.ReadLine(); if (_command == "star") { Console.Clear(); blogPost.Upvote(); Console.WriteLine(blogPost.BlogSummary()); } else if (_command == "unstar") { Console.Clear(); bool success = blogPost.Downvote(); if (!success) { Console.WriteLine("Was not able to downvote, value cannot be less than 0"); } Console.WriteLine(blogPost.BlogSummary()); } else if (_command != "exit") { Console.Clear(); Console.WriteLine(blogPost.BlogSummary()); // Display Error message Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine($"Command `{_command}` is not a valid command. Please try again."); Console.ResetColor(); } } }