Question: C++ Create a class for a simple blog. The owner of the blog should be able to: (a) Numerically list and display all messages (b)
C++
Create a class for a simple blog. The owner of the blog should be able to: (a) Numerically list and display all messages (b) Post a new message (c) Select a specific post and delete it (d) Quit the program Viewers of the blog should only be allowed to: (a) Numerically list and display all messages (b) Quit the program Create a class Viewer and a class Owner that both derive from class Blog. A menu function should be implemented for the Viewer class and Owner class that outputs only the legal choices for that type of user. HINT: You might want to store the blog posts as a vector of strings. Test your class in main() by prompting the user to choose to be either the blog owner or viewer and display the menus accordingly.
Enter o for blog owner menu and v for blog viewer menu:o BLOG MENU (a) Display all posts (b) Post a new message (c) Delete a post (d) Quit Enter your choice:b Enter the message:Hello! This is my first post. Message posted to blog as post #1. BLOG MENU (a) Display all posts (b) Post a new message (c) Delete a post (d) Quit Enter your choice:a BLOG POSTS 1.) Hello! This is my first post BLOG MENU (a) Display all posts (b) Post a new message (c) Delete a post (d) Quit Enter your choice:d
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
