Quiz 1 Flashcards
Which of the following is not true regarding abstraction?
a) Abstraction extracts important
information from less important
information
b) Abstraction specifies how information is handled
c) Focuses on important properties of objects while ignoring inessential details
d) Can be both high level and low level depending on scope
b
Encapsulation ____________
a) enforces inclusion of an object’s data
and its functionality within the object
b) protects data elements from being
accidently modified
c) implements the “has-a” relationship
between objects
d) A and B above
e) B and C above
f) All of the above
d
Grouping a set of classes into discrete units is known as _______
a) Modularity
b) Inheritance
c) Abstraction
d) Packaging
a
Identify the correct statement: In a single inheritance structure, _____
a) a class can have one or more sub- classes
b) a class can have one or more superclasses
c) a class can have exactly one sub-class
d) a sub-class cannot provide additional properties
a
By default, the variables defined in a sub- class in C++ are
a) public
b) protected
c) private
d) friend
c