Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 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

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

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

$12.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Thumbnail
Package deal
Object Oriented Programming Bundled Exam Questions WITH CORRECT Answers
-
20 2025
$ 49.41 More info

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
1455
Member since
2 year
Number of followers
105
Documents
97742
Last sold
2 hours ago
MGRADES

Welcome to MGRADES ,Based at Stanford University in California. I guarantee success and you may end up coming back again and again. We do this for you . We 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

235 reviews

5
97
4
50
3
53
2
15
1
20

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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions