subject

The is a sum-the-data-in-the-tree question. it asks whether a method, sumall() is a well-written recursive method. you will see three different versions of this question throughout the exam, but the opening assumptions, are identical for all such versions. the only difference between the various questions is the code that implements the method : the general tree in this problem is assumed to be physical, i. e., there is no lazy or soft deletion designed into this tree. we are considering a recursive work-horse method to sum all the (assumed) integer data of the sub-tree. the sub-tree is specified by the root pointer passed in. as usual, some client would pass a root to this method, then this recursive method would generate other (child or sibling) roots to pass to itself when recursing. the members sib and firstchild have the same meanings as in our modules. true of false: the method, as defined below, is a good recursive method for summing the data of the sub-tree, based at the root node passed in. to be true, it must satisfy all the following criteria. if it misses one, it is false: it gives the right sum for the sub-tree, that is, it does not miss counting any data. it does no unnecessary work, micro-management or superfluous testing. it covers all situations (empty trees, null roots, handles all the children, treeclass: : sumall(node *root){ int sibsum, thissum, childrensum; if (root == null) return 0; sibsum = sumall(root-> sib); childrensum = sumall(root-> firstchild); thissum = root-> data; return childrensum + sibsum + thissum; }hint: there are three true-false questions that start out the same in this exam, but each has a different method definition. you may want to come back and review your answer to this question after seeing the other method definitions. only one of the three is true, and the other two are false. a. trueb. false

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print
Answers: 3
question
Computers and Technology, 23.06.2019 00:00
Which is the correct sequence of steps to set up a document in landscape orientation? a. select page setup from the file menu. then click the margins tab and select landscape. b. select page setup from the edit menu. then click the margins tab and select landscape. c. select page setup from the insert menu. then click the margins tab and select landscape. d. select page setup from the format menu. then click the margins tab and select landscape
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
This assignment continues work on the online booking facility introduced at the end of chapter- 10. the work will be continued in the assignments for chapters 14 and 15 (a) assume that you will produce your online booking facility using an agile approach. i. suggest the kind of user research you would like to conduct for your product before iteration cycles begin. ii prioritize the requirements for your product according to business value, i.e which requirements are likely to provide the greatest business benefit, and sketch out the ux design work you would expect to undertake during the first four iteration cycles, i.e. cycle 0, and cycles 1 to 3. (b) using one of the mockup tools introduced above, generate a mockup of your product's landing page, as developed in the assignment for chapter-11 (c) using one of the patterns websites listed previously, identify suitable interaction patterns for elements of your product, and develop a software-based prototype that incorporates all the feedback and the results of the user experience mapping achieved at the end of chapter-11. if you do not have experience in using any of these, create a few html web pages to represent the basic structure of your website
Answers: 2
You know the right answer?
The is a sum-the-data-in-the-tree question. it asks whether a method, sumall() is a well-written rec...
Questions
question
History, 07.08.2019 19:10
Questions on the website: 13722363