This is a list of the topics we have covered since the midterm.
The final questions can come from any of these.
Read over the notes and review the readings mentioned in them.
Functions can be used wherever a variable of the return type can be used.
Know the difference between pass by value and pass by reference
Declaration, use, dereferencing.
How do you get the address of a variable?.
Know the difference between the types of pointers and the types of the things
they point at.
char * p; // p is a character pointer, pointer to character
char x; // x is a character
p = &x; // p points at x;
cout << *p; // *p i of type character
Classes represent some object or action in the program.
Know how to create one.
What is the difference between public, private and protected.
What is a constructor?
What are they for and how are they called?
What is the difference between a class and an object or instance?
How do you create an object and how
do you access the properties and methods.
functions attached to a class.
Know how to write classes, both inline and outside the class.
Everything we know about an object is included in the object
Overriding methods. Child classes can have methods with the
same name as one in the parent class.
- inheritance, is-a
Child class gets the properties and methods of the parent.
Parent constructor called first.
Inheritance goes down the list, from parent to child to grandchild
and so on.
Know how to make one class inherit from another.
A function can take parameters of the parent class and
can take variables of the child types.
- Other stuff
Arrays of classes.