Question: ANSWER IN JAVA The Post class models a post that you might see on a social media website. There will be a number of different

ANSWER IN JAVA

The Post class models a post that you might see on a social media website. There will be a number of different types of posts (PollPost, VideoPost, MessagePost) which will all derive their basic behavior from the Post class. These posts can be added to the PostWall for public viewing.

A Post should have an author, time, content, a list of reactions, and a list of comments.

A Post should have a single constructor that takes in the author and content and initializes the other fields to some default values (empty list, 0, empty string, etc.). time should be set to the current time (it never changes). For help on this consult: Oracle Docs: Calendar.

reactions must keep track of the "reactions" users have to a post. These are limited to all of the basic human emotions, namely: =), =|, =(, =O - there are only four possible reactions. You can copy these emojis into your code.

As you may have realized, comments will be Comments. To avoid errors, for now, you will need to create a Comment class. A Comment should have an author, content, and a time.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!