Quiz 2 is designed to explore the introductory concepts of C++
Quiz 2 contains multiple choice or short answer problems and one programing question writing a function to work on a simple provided matrix class.
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
Assignments referenced:
- lab_intro
- lab_debug
- lab_memory
- mp_intro
Points:40
Registration: Thursday, January 30
Start: Friday, February 14
End: Monday, February 17