CS246 Study Guide - Midterm Guide: Memory Leak, Dynamic Dispatch, Object Model

238 views11 pages

Document Summary

There are 5 questions for a total of 80 marks. In the immortal words of the late douglas adams, don"t panic! Answer all of the questions on this exam sheet. Use the blank exam booklets only as scratch paper. (underline your last name) For each statement, circle t (true) or f (false), or do nothing. You get 2 points for a correct answer, 0 points for no answer, and 1 for a wrong answer. However, you cannot get less than 0 on this page. You may provide a short explanatory statement to support your answer if you desire, but it is not required. (a) t. Since a private method cannot be used by subclasses, it"s useless to declare it virtual. (b) t. F the dynamic type of a pointer should always be the same as or an inheritance descendant of the static type. (c) t.