output file format

This commit is contained in:
Jidong Xiao
2023-11-02 20:27:03 -04:00
parent 1e7139ce55
commit 423ddccfed

View File

@@ -160,8 +160,8 @@ All expected output files are provided. Among all the five operations mentioned
When displaying the comments, we need to consider the displaying order of the comments. The rules are:
1. existing comments: comments which are included in the json file are existing comments. And when displaying comments, a parent comment should be displayed (i.e., printed to the output file) before its children comments are displayed (i.e., printed to the output file). Two children comments who have the same parent should stay in the order as they are in the json filee. For example, both A and B are existing commens, if comment A appears in line 1 of the json file, and comment B appears in line 4 of the json file, then comment A should be displayed (i.e., printed to the output file) before comment B is displayed (i.e., printed to the output file).
2. newly added comments: for newly added comments, a parent comment should be displayed (i.e., printed to the output file) before its children comments are displayed (i.e., printed to the output file). Two children comments who have the same parent should stay in the order as they are in the input2.txt file.
1. existing comments: comments which are included in the json file are existing comments. And when displaying comments, a parent comment should be displayed (i.e., printed to the output file) before its children comments are displayed (i.e., printed to the output file). Two children comments who have the same parent should stay in the order as they are in the json file. For example, both A and B are existing commens, if comment A appears in line 1 of the json file, and comment B appears in line 4 of the json file, then comment A should be displayed (i.e., printed to the output file) before comment B is displayed (i.e., printed to the output file).
2. newly added comments: for newly added comments, a parent comment should be displayed (i.e., printed to the output file) before its children comments are displayed (i.e., printed to the output file). Two children comments who have the same parent should stay in the same order as they are in the input2.txt file.
## Program Requirements & Submission Details