Question: Assignment 4-Recursive Forum Posts Each message in an on-line forum is captured with a unique message ID, a parent ID, and the text of the

 Assignment 4-Recursive Forum Posts Each message in an on-line forum is

Assignment 4-Recursive Forum Posts Each message in an on-line forum is captured with a unique message ID, a parent ID, and the text of the message. The parent ID is the message ID of another message to which a message is replying (see Figure ). The first message will have a parent ID of 0, indicating that it is not replying to any message (i.e., it is a new discussion). There could be more than one discussion in a forum! Loops, beginner This message would have a parent ID of O the question in the bock aska for The su would be 3-7-7 17 all odd digis fs For eample fnis 32677 the sum Any help would be appecia These messages are replying to the message above. Their parent ID would be the message ID of the message above. Figure 1: Forum post example from StackOverflow.com All messages are stored in a file in the following format where each message is on a separate line and the pipe (I) is a delimiter separating the fields. Task Note: All classes written for this assignment must include Java documentation comments. (1) Create an appropriate class or set of classes to encapsulate the messages (e.g., a Message class) (2) Create an application (i.e., a class with a main in it, right?) where the messages are read in from a file named "msg.txt" and displayed in a nesting hierarchical structure that shows the relationship of the messages (i.e each reply is displayed on a separate line, indented by 2 white spaces relative to the message being replied to) Remember to document your code using Javadoc comments. 1

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!