CS302 MIDTERM REVIEW Questions and Answers with Verified
Solutions | Latest 2026 Update
Q: polymorphism
Answer:
Third principle of object oriented programming languages: ABILITY OF AN
OBJECT TO TAKE ON MANY FORMS.
Q: 3 principles of object oriented design
Answer:
Encapsulation, inheritance, and polymorphism
Q: interface, why?
Answer:
if we wanted to ensure that multiple implementations of a data structure share the
same behaviors.
, CS302 MIDTERM REVIEW Questions and Answers with Verified
Solutions | Latest 2026 Update
Q: templated class, why?
Answer:
If we wanted to encapsulate storing a collection of strings and storage behaviors, but
we didn't know what type of object until we write the program. We would use this
tool.
Q: Observers
Answer:
Report back information. (size method of List, returns an int) (relational operators
==, !=, <, >)
Q: Creators
Answer:
create new objects of the type, may take an object as an argument but not an
object of the type being constructed.
ex: int - (assignment operator with numeric literals 0,1,2)
or string - (constructors)
Solutions | Latest 2026 Update
Q: polymorphism
Answer:
Third principle of object oriented programming languages: ABILITY OF AN
OBJECT TO TAKE ON MANY FORMS.
Q: 3 principles of object oriented design
Answer:
Encapsulation, inheritance, and polymorphism
Q: interface, why?
Answer:
if we wanted to ensure that multiple implementations of a data structure share the
same behaviors.
, CS302 MIDTERM REVIEW Questions and Answers with Verified
Solutions | Latest 2026 Update
Q: templated class, why?
Answer:
If we wanted to encapsulate storing a collection of strings and storage behaviors, but
we didn't know what type of object until we write the program. We would use this
tool.
Q: Observers
Answer:
Report back information. (size method of List, returns an int) (relational operators
==, !=, <, >)
Q: Creators
Answer:
create new objects of the type, may take an object as an argument but not an
object of the type being constructed.
ex: int - (assignment operator with numeric literals 0,1,2)
or string - (constructors)