Exam 2 is designed to explore the introductory concepts of C++
Exam 2 your choice of one programing question writing a function to work on a simple provided matrix class or one programing question writing a function to work with a class that exploits inheritance.
Topics Covered
Topics from lecture:
- Classes in C++
- Public members functions
- Private helper functions
- Private variables
- Constructors
- Automatic default constructor
- Custom constructors (default and non-default)
- Copy constructor
- Automatic copy constructor
- Custom copy constructor
- Namespaces in C++
- Creating a class that is part of a namespace (eg:
Cube
is part of the cs225
namespace)
- Using a class from a namespace (eg:
cs225::Cube
)
- Purpose and usefulness of namespaces
- Variables
- Four properties: name, type, location (in memory), and value
- Primitive vs. user-defined
- Memory
- Indirection in C++:
- Reference variables
- Pointers
- Differences and trade-offs between each type
- Stack memory
- Heap memory
- Functions: Calling and Returning
- Pass by value, by reference, and by pointer
- Return by value, by reference, and by pointer
- In the Inheritance question only
- Using a Linked List
- Adding to a linked list
- Removing from a linked list
- Searching in a linked list
Assignments referenced:
- lab_intro
- lab_debug
- lab_memory
- lab_inheritance
- mp_intro
- mp_stickers
Points:75
Registration: Friday, September 18
Start: Friday, October 02
End: Saturday, October 03