Comp 220 comp220 final exam 5 (perfect tutorial)

Page 1

COMP 220 COMP220 Final Exam 5 (Perfect Tutorial)

Download here: http://homeworkfox.com/tutorials/computer-science/11741/comp-22


(TCO 2) Explain the basic C++ syntax for creating a class. Include an explanation of the private and public section of a class and the class members. Include a code segment to illustrate your answer. (Points : 10) 1. (TCO 1) Describe the conceptual model of a two-dimensional array. Include in your explanation how a two-dimensional array might be used, why they are similar to tables, and how to declare and initialize a two-dimensional array. 2. (TCO 3) Write and explain the definition of what composition is and how it is useful in writing an objectoriented program. Also, explain how it is different from inheritance and how both inheritance and composition are useful in developing object-oriented programs. 3. (TCO 4) Explain what a base class access specifier is and how it affects inheritance. (Points : 10) 4. (TCO 5) Write the code that will declare an integer array of dimension 10 and then use pointer arithmetic to initialize all the elements of that array to zero. Comment on each line of code to describe what that line does. (Points : 10) 5. (TCO 6) List and describe three restrictions regarding operator overloading. (Points : 10) 6. (TCO 7) Discuss run-time binding and how it relates to virtual functions. (Points : 10) 7. (TCO 8) For a multifile project that contains just one class, list and describe each of the files that would be required to implement and test the functions of the class. (Points : 10)


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.