terms I need to study for the final exam Flashcards
aggregate construct
allows the manipulation of several data items as a whole
examples of aggregate construct
classes, structures, arrays, vectors, strings, matrices
what is the default access modifier for a structure
public
what is the default access modifier for a class
private
do you need a semicolon at the end of a structure?
yes
do you need a semicolon at the end of a class?
yes
can structure variables be directly compared? (using ==)
NO
identifiers
give a variable its type
do you pass objects to the copy constructor by value or by reference during program execution?
by value
do you pass objects to the copy constructor by value or by reference in the copy constructor prototype?
by reference
how to delete a pointer that is an array?
delete [] pointerName;
how do you see the size of the vector?
vectorName.size()
complex structures
an instance (object) of a structure in another structure
to assign a pointer to a variable’s address
int *p = &x;
how to declare a class with simple inheritence
class ChildClassName : (public, private, or protected) ParentClassName {};
how to declare a class with multilevel inheritance
class ParentClass : public GrandparentClass{};
class ChildClass : public ParentClass {};
**the child class has access to both the parent class and the grandparent class
how to declare a class with multiple inheritance
class ChildClass : public ParentOneClass , public ParentTwoClass {};
**use a comma to separate the class names and access modifiers