COMP220 Week 8 – Study Material for Finals – 13 MCQs, 8 Essay Questions – Guaranteed 100% score

Quiz Price = $20
[orb_cyber_store id=”314″]
Please feel free to send us your queries at: support@iqrajavaid.com
Problem Statement

1. (TCO 4) If the derived class classD overrides a public member function functionName of the base class classB, then to specify a call to that public member function of the base class, you use the ____ statement. (Points : 4)
classD::functionName();
classB::functionName();
classD.functionName();
classB.functionName();

2. (TCO 6) Which of the following operators can be overloaded? (Points : 4)
.
.*
::
++

3. (TCO 6) To overload the pre-increment (++) operator for a class, if the operator function is a member of that class, it must have ____ parameter(s). (Points : 4)
0
1
2
3

4. (TCO 6) An example of a unary operator is (Points : 4)

+
*
/

5. (TCO 6) If a class has pointer data members, it should (Points : 4)
overload the assignment operator and define the copy constructor.
not overload any operators.
overload only the assignment operator.
overload the assignment operator, but not define the copy constructor.

6. (TCO 6) What is a friend function? (Points : 4)
An overloaded operator
A function in a derived class that overrides a base class function of the same name
A non-member function of a class, but which has access to all of the members of the class
A function called by member function of a class

7. (TCO 7) Which term designates the ability to combine data and operations on that data in a single unit? (Points : 4)
Inheritance
Encapsulation
Polymorphism
Composition.

8. (TCO 7) Any child class function with the same name and argument list as the parent class does what to the parent function? (Points : 4)
Overloads
Specializes
Generalizes
Overrides

9. (TCO 7) The function prototype shown below is an example of what?
virtual void draw() = 0; (Points : 4)
A virtual function
An illegal function which will generate a compiler error
A pure virtual function
A function with a return value that is always 0

10. (TCO 7) Which of the following are effective tools for managing software complexity? (Points : 4)
Dynamic and static binding
Inheritance and polymorphism
Encapsulation and instantiation
Simulation and debugging

11. (TCO 7) Which statement is true of a class object whose class is derived public from a base class? (Points : 4)
The derived class object is also a base class object.
The base class object is also a derived class object.
The derived class object has no relation to an object of its base class.
It must have the same scope resolution of any and all objects of its base class.

12. (TCO 8) In a multi-file, object-oriented C++ project, which is the correct statement for the constructor implementation, given that the constructor is correctly defined in the class definition file? (Points : 4)
Classname:Classname{ }
Classname { }
Classname::Classname { }
Classname { }

13. (TCO 8) Which preprocessor directive is not used for conditional compilation? (Points : 4)
define
ifndef
ifdef
endif

14. (TCO 8) If Class A has an object of Class B as a data member, what type of function must be used for an object of Class A to obtain a copy of a private data member of Class B? (Points : 4)
Class B copy constructor
Class B accessor function
Class A accessor function
It is not possible for an object of Class A to do this action.

1. (TCO 1) Explain how to use loops to process the data stored in a two-dimensional array. In your explanation, include a two-dimensional array declaration and initialization. (Points : 10)
2. (TCO 2) Develop a class definition that models an employee. Include private and public member functions and variables. Demonstrate how the class would be instantiated and how class members would be accessed. (Points : 10)
3. (TCO 3) Using a personal computer as a base model, write a C++, syntactically correct class definition demonstrating composition. In the class definition, include at least the following threeitems that are common to a PC: a CD drive, a hard disk drive, and a power supply. You are not required to include any constructors, destructors, or additional member functions; you are only required to list the members that directly show composition and the proper access attributes. (Points : 10)
4. (TCO 4) If a class is derived protected from a base class, explain how this affects the inheritance of all the public, protected, and private members of the base class by the derived class. (Points : 10)
5. (TCO 5) Write all the code necessary to dynamically allocate an array of 10 double-precision, floating-point variables and then write the code that will deallocate the memory. Add comment fields to each line of code describing what it is and does. (Points : 10)
6. (TCO 6) Explain why the native operators defined in C++ will not work with classes unless they have been properly overloaded. (Points : 10)
7. (TCO 7) Explain what pure virtual functions are, what an abstract class is, and how they both relate to dynamic binding and polymorphism. (Points : 10)
8. (TCO 8) Why are comments and comment blocks important to programming? (Points : 10)

Relevant Material
Instructions
* Please click on “Buy Now” button to complete the purchase.Please note that the payment is done through PayPal.
* If you have any issues with the payment method, please let us know at support@iqrajavaid.com and that can be discussed and considered.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at support@iqrajavaid.com.
* As soon as the payment is received through PayPal, download link of the solution will automatically be sent to the address used in Paypal.
* Please check your junk mails as the download link email might go there.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at support@iqrajavaid.com and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please expect a response within 8 hours from our side.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at support@iqrajavaid.com.
******************************************** Good Luck ***************************************************
Payment Details
Quiz Price = $20
[orb_cyber_store id=”314″]
Please feel free to send us your queries at: support@iqrajavaid.com

Leave a Reply