Final Topics
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.
-
Pointers
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
- pointers and arrays
The name of an array is a pointer to the array.
A pointer to the array is like the name of an array.
Pointer and array notation can be interchanged.
Know how to create and use a pointer to an array.
- class/instance
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.
- methods
functions attached to a class.
Know how to write classes, both inline and outside the class.
- Encapsulation
Everything we know about an object is included in the object
- Polymorphism
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.
- make
Know what a dependency is and what a rule is.
- Exceptions
Know how to create one.
When an exception happens, control jumps immediatly to
the handler