CSE 220 EXAM QUESTIONS AND ANSWERS 100% CORRECT | VERIFIED AND APPROVED
1 view 0 purchase
Course
CSE 220
Institution
CSE 220
CSE 220 EXAM QUESTIONS AND ANSWERS 100%
CORRECT | VERIFIED AND APPROVED
Assume that Publication is the root class of an inheritance tree. You want
to form a linked list of different publications in the inheritance tree, including
Book, Report, Newspaper, etc. What is the best way to create ...
Assume that Publication is the root class of an inheritance tree. You want
to form a linked list of different publications in the inheritance tree, including
Book, Report, Newspaper, etc. What is the best way to create a linked list
using PublListNode and Publication classes?
A.
The PublListNode class contains the Publication class.
B.
The Publication class is derived from the PublListNode class.
C.
The PublListNode class is derived from the Publication class.
D.
,The Publication class contains the PublListNode class. - ✔✔A.
The PublListNode class contains the Publication class.
If the relation between two C++ classes can be best described as "is-a"
relation, we should
A.
contain one class in the other (containment).
B.
define them to be independent of each other.
C.
derive one class from the other (inheritance).
D.
merge them into a single class. - ✔✔C.
derive one class from the other (inheritance)
Consider C++'s typing system. C++ uses (Select all correct answers)
,A. value semantics for its primitive types (such as integer and float) only.
B. both value semantics and reference semantics for its object types.
C. both value semantics and reference semantics for its primitive types .
D. reference semantics for its object types only. - ✔✔B.
both value semantics and reference semantics for its object types.
C.
both value semantics and reference semantics for its primitive types .
What does the following line of code define?
Days operator++(int)
An overloaded operator *
A new class Days.
a new int type. - ✔✔An overloaded operator ++
, What does the following line of code define?
bool operator>(const Cylinder &c)
A virtual function Cylindarer
An overloaded operator >
An overloaded operator &
An overloaded function Cylinder - ✔✔An overloaded operator >
You can define two overloading operations with the same operator name,
but with different parameter types.
True
False - ✔✔True
Which statements or operations will call the destructor of a class? Select all
that apply.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller morren. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.49. You're not tied to anything after your purchase.