COP 3330 Final Exam Graded A+ (Verified)
A const object may only call: - ANSWER-const member functions
A stack can be implemented with a: - ANSWER-linked list or a vector
abstract classes - ANSWER-cannot build objects of abstract class type
binary operators - ANSWER-2 operands
+,=,*,/,==,>= etc...
bool Fraction::Equals() - ANSWER-returnType className::memberFunction()
Class - ANSWER-a blueprint for objects
compilation errors - ANSWER-syntax errors
undeclared variables/functions
improper function calls
const member data - ANSWER-
copy constructor (created by the compiler) makes - ANSWER-a shallow copy
deep copy - ANSWER-
default constructor - ANSWER-a constructor that can be called with no arguments. It
either takes no arguments or has default values for each of the arguments taken.
dynamic member data - ANSWER-private:
double * val;
explicit keyword - ANSWER-prevents the compiler from using that constructor for
implicit conversions
forces the code to either use a parameter of the correct type, or cast the parameter to
the correct type
extraction >> operator overload - ANSWER-friend istream& operator>> (istream& s,
Fraction& f);
Fraction n1, n2, n3;
n3 = n1 + 5;
n3 = 10 + n2;
A const object may only call: - ANSWER-const member functions
A stack can be implemented with a: - ANSWER-linked list or a vector
abstract classes - ANSWER-cannot build objects of abstract class type
binary operators - ANSWER-2 operands
+,=,*,/,==,>= etc...
bool Fraction::Equals() - ANSWER-returnType className::memberFunction()
Class - ANSWER-a blueprint for objects
compilation errors - ANSWER-syntax errors
undeclared variables/functions
improper function calls
const member data - ANSWER-
copy constructor (created by the compiler) makes - ANSWER-a shallow copy
deep copy - ANSWER-
default constructor - ANSWER-a constructor that can be called with no arguments. It
either takes no arguments or has default values for each of the arguments taken.
dynamic member data - ANSWER-private:
double * val;
explicit keyword - ANSWER-prevents the compiler from using that constructor for
implicit conversions
forces the code to either use a parameter of the correct type, or cast the parameter to
the correct type
extraction >> operator overload - ANSWER-friend istream& operator>> (istream& s,
Fraction& f);
Fraction n1, n2, n3;
n3 = n1 + 5;
n3 = 10 + n2;