Exam 1 is designed to explore the foundational concepts of C++ and Theory background as well as the material coverd through lecture 9 (Monday Feb 7th). For on campus students it is in the CBTF for off campus students this is still being resolved.
Exam 1 contains only multiple choice or short answer problems. You will have 50 minutes to complete this exam.
There is a practice exam availibe on PrairieLearn.
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
- Linked List
- Operation
insertAtFront
, including running time and insertion strategies
- Operation
insertAtIndex
, including running time, on both a sorted and unsorted list
- Operation
removeAtIndex
, including running time, on both a sorted and unsorted list
- Operation
insertAfterElement
, including running time, on both a sorted and unsorted list
- Operation
removeAfterElement
, including running time, on both a sorted and unsorted list
- Operation
findIndex
, including running time, on both a sorted and unsorted list
- Operation
findData
, including running time, on both a sorted and unsorted list
- Trees
- Basic tree terminology (CS 173)
- Tree Property: Binary
- Tree Property: Height
- Tree Property: Full
- Tree Property: Perfect
- Tree Property: Complete (as defined in data structures)
- Mathematical foundations:
- Be able to give a closed form solution to a recurence relation.
- Be able to indicate the big-O running time of common algorithms (eg: binary search, merge sort, etc).
- Be able to identify the relationship between two sets or functions (eg: reflexive, symmetric, transitive, ordered, equivalence, onto, one-to-one, etc)
- Be able to understand basic graph terminology.
- Be able familar with Trees
- Be able to understand a standard proof and proof by induction.
Assignments referenced:
- lab_intro, lab_debug
- mp_stickers
Points:100
Registration: Wednesday, February 03
Start: Monday, February 15
End: Wednesday, February 17