Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Objective: Reclusively display messages in a discussion forum with proper indentation. Each message in an online forum is captured with a unique message ID, a parent ID, and the text of the message....

1 answer below »
Objective: Reclusively display messages in a discussion forum with proper indentation. Each message in an online 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 that a message is replying to. 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. All messages are stored in a file in the following format: messageID|parentID|text, where each message is a line and “|” is the delimiter to separate the fields. You are to: 1. Implement appropriate class or classes to encapsulate the messages. 2. Implement an application where the messages are loaded from file “msg.data” and displayed in a nesting hierarchy structure that show the relationship of the messages (each reply message is displayed on a separated line and indented by 2 white spaces relatively to the message being replied to) 3. [bonus] provide options for the user to create a new discussion and reply to a message. These new information must be added to the file containing the messages when the user exists your application.
Answered Same Day Apr 23, 2021

Solution

Ankit answered on Apr 24 2021
154 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here