CS302 MIDTERM REVIEW| QUESTIONS WITH CORRECT ANSWERS 100% VERIFIED|
GUARANTEED SUCCESS
polymorphism Third principle of object oriented programming languages: ABILITY OF AN
OBJECT TO TAKE ON MANY FORMS.
3 principles of object oriented design Encapsulation, inheritance, and polymorphism
interface, why? if we wanted to ensure that multiple implementations of a data structure
share the same behaviors.
templated class, why? 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.
Observers Report back information. (size method of List, returns an int) (relational operators
==, !=, <, >)
Creators 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)
Producers (arithmetic operators: +, -, *, /
Mutators
GUARANTEED SUCCESS
polymorphism Third principle of object oriented programming languages: ABILITY OF AN
OBJECT TO TAKE ON MANY FORMS.
3 principles of object oriented design Encapsulation, inheritance, and polymorphism
interface, why? if we wanted to ensure that multiple implementations of a data structure
share the same behaviors.
templated class, why? 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.
Observers Report back information. (size method of List, returns an int) (relational operators
==, !=, <, >)
Creators 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)
Producers (arithmetic operators: +, -, *, /
Mutators