100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

OOP Exam 2 UPDATED ACTUAL Exam Questions and CORRECT Answers

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
17-04-2025
Written in
2024/2025

OOP Exam 2 UPDATED ACTUAL Exam Questions and CORRECT Answers - true Under public inheritance, derived-class objects can be treated as base class objects - CORRECT ANSWER A base-class initializer can be provided in the derived-class constructor to call the base-class constructor explicitly; otherwise, the derived class' constructor will call the base class's ______________ constructor. - CORRECT ANSWER - default A derived class can ______________________ a base-classes member functions by supplying a new version of that function with the same signature - CORRECT ANSWER - override

Show more Read less
Institution
Object Oriented Programming
Course
Object Oriented Programming









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Object Oriented Programming
Course
Object Oriented Programming

Document information

Uploaded on
April 17, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

OOP Exam 2 UPDATED ACTUAL Exam
Questions and CORRECT Answers
Under public inheritance, derived-class objects can be treated as base class objects - CORRECT
ANSWER - true


A base-class initializer can be provided in the derived-class constructor to call the base-class
constructor explicitly; otherwise, the derived class' constructor will call the base class's
______________ constructor. - CORRECT ANSWER - default


A derived class can ______________________ a base-classes member functions by supplying a
new version of that function with the same signature - CORRECT ANSWER - override


A derived class can directly access protected members of its base class - CORRECT
ANSWER - true


Only members and friends of a base class, and members and friends of a derived class may
access a base class's ____________________ members. - CORRECT ANSWER -
protected


An "Is a" relationship is represented by - CORRECT ANSWER - inheritance



a "has a" relationship is represented by - CORRECT ANSWER - composition


A ____________________ class is more specific than its ____________________ class and
represents a smaller group of objects - CORRECT ANSWER - derived
base


When you use _____________________ inheritance all of the public and protected members in
the base class become protected in the derived class - CORRECT ANSWER - protected

, The process used to resolve which virtual function to call at run-time is called
________________ binding. - CORRECT ANSWER - dynamic


Apply C++ 11's ________________ keyword to every overridden function in a derived-class.
This causes the compiler to check whether the base class has a member function with the same
name and parameter list. - CORRECT ANSWER - override


When a virtual function is called using an object by name and using the dot member-selector,
what type of binding is used? - CORRECT ANSWER - static


C++ enables __________________________. This enables us to write programs that process
objects of classes that are part of the same class hierarchy as if they were all objects of the
hierarchy's base class. This allows us to "program in general" rather than "program in specific". -
CORRECT ANSWER - polymorphism


When calling a virtual function the program will choose the correct implementation according to
which of the following: - CORRECT ANSWER - Object Type


Once a function is declared ___________________ , it remains so all the way down the
inheritance hierarchy from that point even if it is not declared as such when a class overrides it. -
CORRECT ANSWER - virtual


A ________ ____________ function is one with an initializer of = 0 and has been declared
virtual. (2 words are expected) - CORRECT ANSWER - pure virtual


Provide a virtual base-class _______________________, even if one is not required. Then when
an object in the hierarchy is destroyed explicitly by applying the delete operator to a base-class
pointer to a derived class object, the entire object will be freed correctly. - CORRECT
ANSWER - destructor


When C++ compiles a class that has one or more virtual functions, it builds a
______________________________ for that class. This is used by the executing program to

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
MGRADES Stanford University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1063
Member since
1 year
Number of followers
102
Documents
68976
Last sold
1 hour ago
MGRADES (Stanford Top Brains)

Welcome to MGRADES Exams, practices and Study materials Just think of me as the plug you will refer to your friends Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3.8

168 reviews

5
73
4
30
3
43
2
8
1
14

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions