subject

Design and implement the class PostType which is composed of class textType of the previous homework (i. e. using composition). In addition to the main text which represents the Post part of the postType, the class has a dynamic list of comments ( each element of type text represents the certain comment). Also, the class has the variable postID that represents the number associated with the post. The length of the comments list represents the number of comments and stored in the NumComments integer variable. In addition to the constructor with default parameters and the necessary functions, the function Show() or Print() will print the name of the person that write the post then the post itself followed by the comments of persons on the post (proceeded by the name of person write the comment). You can use the print of textType to print each post and each comment on the post after doing the following modification in Note 1. Also, you need a public function addComment to add comments to the Post with all necessary parameters such as the name the comment. Note 1: modify the class textType such that another variable of type string called Name represents the person who creates or said the text. This new variable must be printed with text in the print function and initiated in the constructor and any necessary modification. Note 2: the design of the class consists of design the UML Class diagram while the implementation consists of the class definition and class implementation (functions definition). Both should be submitted until next Monday during the lecture *

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:10
Which are not examples of chronic or persistent stress? moving
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
question
Computers and Technology, 23.06.2019 19:00
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u.s. 483 (1954). b. international shoe co. v. washington, 326 u.s. 310 (1945) c. haynes v. gore, 531 u.s. 98 (2000). d. international shoe co. v. washington, 14 u.s. code 336.
Answers: 1
You know the right answer?
Design and implement the class PostType which is composed of class textType of the previous homework...
Questions