Computers and Technology

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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 10:20, chonawilson4
Suppose there is a relation r(a, b, c) with a b+-tree index with search keys (a, b).1. what is the worst-case cost of finding records satisfying 10 < a < 50 using this index, in terms of the number of records n1, retrieved and the height h of the tree? 2. what is the worst-case cost of finding records satisfying 10 < a < 50 and 5 < b < 10 using this index, in terms of the number of records n2 that satisfy this selection, as well as n1 and h defined above? 3. under what conditions on n1 and n2, would the index be an efficient way of finding records satisfying the condition from part (2)?
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, lopez7512
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
image
Computers and Technology, 23.06.2019 17:00, solizpaco7124
1. which of the following is not an example of an objective question? a. multiple choice. b. essay. c. true/false. d. matching 2. why is it important to recognize the key word in the essay question? a. it will provide the answer to the essay. b. it will show you a friend's answer. c. it will provide you time to look for the answer. d. it will guide you on which kind of answer is required.
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, taytay1828
What are the 12 colors of the spectrum called?
Answers: 1
Do you know the correct answer?
Design and implement the class PostType which is composed of class textType of the previous homework...

Questions in other subjects:

Konu
Computers and Technology, 31.03.2021 02:20