Skip to content

CT 301 Final Exam - Study Guide (main)

CT 301: C++ Fundamentals · Summer 2026 · Dr. Francisco R. Ortega

Final Exam - Study Guide

The main guide. Cumulative over the whole course. Read this first, then use Guide 1 and Guide 2 for the depth on each topic.

The final is cumulative: it draws on everything from Exam 1 and Exam 2, with a heavy emphasis on the two homeworks. It tells you what is on the exam, where each topic is explained in detail, how the pieces connect across the course, and how to study given that you may bring one cheat sheet.

Three guides, one exam. You already have two detailed study guides on Canvas:
  • Guide 1 = the Exam 1 Study Guide (Lectures 1, 2, 3, 5, 6 and HW#1). Foundations, functions, classes, inheritance, ownership, smart pointers.
  • Guide 2 = the Exam 2 Study Guide (Lectures 7, 8, 9, 10 and HW#2). The free store, arrays/pointers, copy/move, templates/exceptions, and the hand-built ct::Vector.
This guide does not repeat their contents. Read this for the overall picture and the connections across the course, and open Guide 1 or Guide 2 whenever you want the per-lecture detail, examples, and readings.

0. How to use this guide

Study in three passes:

  1. This guide, top to bottom. Get the shape of the whole course and how the two homeworks tie it together.
  2. Guide 1 and Guide 2, section by section, using the coverage map below to see what carries the most weight. Work the small code examples in your head or on paper.
  3. The Practice Problems (Exam 1 and Exam 2 practice sets) to gauge understanding. Do not read practice answers first: you will memorize answers instead of learning concepts, and the exam uses different code for the same concepts.

1. The final at a glance

ItemDetail
WhenJuly 10, 2026, 8:00 am - 8:00 pm Mountain Time (one attempt inside that window)
Length120 minutes, once you start
Weight200 points, in its own assignment group
CoverageCumulative: Lectures 1-3 and 5-10, HW#1, HW#2. Everything from Exam 1 and Exam 2, plus a few questions that tie ideas across the course.
FormatThe same question types as Exam 1 and Exam 2: true/false, multiple choice, and select all that apply. No fill-in-the-blank, no coded responses.
ProctoringRespondus LockDown Browser + Webcam required (same as Exam 1 and Exam 2).
NotesOne cheat sheet (you may use both sides). You may also keep up to 6 sheets of scratch paper, but they must start blank - hold each one up to the webcam before you begin so the proctor can see it is empty.

2. How to use a cheat sheet on this exam

Because you can bring notes, the questions are not recall. Almost every one shows a short piece of code and asks what actually happens - what it prints, which line compiles, what the capacity becomes, which exception is thrown. A sheet that lists rules will not answer these for you; you have to apply the rule to the specific code in front of you.

So practice tracing code, not memorizing facts. Put the things you might blank on onto your sheet - the growth rule, the rule-of-five checklist, which operations throw which exception, const-pointer vs pointer-const - but spend your study time reading and predicting code. Good candidates for the sheet:

  • Growth policy: new_cap = (capacity == 0) ? 8 : capacity * 2 (0 → 8, then doubles).
  • Rule of five: destructor, copy ctor, copy assignment, move ctor, move assignment - a class that owns a raw buffer needs all five; a class whose members already manage themselves needs none (rule of zero).
  • Exceptions: at() throws std::out_of_range; reserve/resize throw std::length_error; operator[] does not check.
  • const int* (cannot write through) vs int* const (cannot repoint).
  • enum class is scoped and does not convert to int; a plain enum does.

3. Coverage map - where every topic lives

The HW#1 and HW#2 material (and the lectures that feed them) carries the most weight, so study those hardest. The table routes each area to its detailed section in Guide 1 or Guide 2. This is a possible breakdown; the numbers are estimates and may change.

AreaWeight (est.)LecturesRead in detail
HW#1 area foundations, classes, ownership~35%L1, L2, L3, L5, L6Guide 1 §1-§6 + Pointers Guide
HW#2 area free store, the Vector, templates~35%L7, L8, L9, L10Guide 2 §1-§5
Broader foundations streams, functions, std library~20%L1-L6Guide 1 §1-§5
Transfer / integrative cross-course reasoning~10%whole courseSection 5 below

4. How the course fits together

The two homeworks draw on most of the course. How the parts relate:

There are two ways to own a resource: let the library do it (HW#1, unique_ptr, rule of zero) or do it by hand (HW#2, raw buffer, rule of five). Most of the other material supports one of these two.

5. Transfer topics (the cross-course questions)

A few questions tie two parts of the course together. These are the connections to have straight; they are not in Guide 1 or Guide 2 by themselves.

Rule of Zero vs Rule of Five - which applies?

Two ways to own memory - unique_ptr vs a raw buffer

The Vector idea generalizes

Memory safety across the course

6. The must-know from each homework (the 70%)

HW#1 (see Guide 1 §6)

  • Abstract base Item with pure virtual functions; derived Equipment / Consumable / Borrowed override behavior (e.g. what may be loaned or sold). Polymorphic dispatch through a base pointer or reference, including virtual destructors and one non-member operator<< that calls a virtual printTo.
  • enum class states; an Inventory that owns items in vector<unique_ptr<Item>> and returns non-owning Item* views; the rule of zero; moving ownership between states.

HW#2 (see Guide 2 §5)

  • Manual memory: allocation (::operator new) separate from construction (placement new); the destructor destroys elements then frees the buffer.
  • Growth 0 → 8 → double; size vs capacity; reserve vs resize; reallocation invalidates handles.
  • Deep-copy copy constructor and buffer-stealing move constructor (the rule of five); iterators as raw pointers; at() vs operator[] and the exceptions; templates and CTAD.

7. How the exam is structured

8. Practice, and the night before

Practice with these three

  • Quiz 6 - tests cumulative knowledge across the whole course.
  • Lab 6 - working through it will help you prepare for the exam.
  • "Practice Questions for Exam" - a final practice set.

Do not memorize the questions; learn the concepts behind them. The exam's questions will likely be different and may test other aspects of the same idea. Do these practice items and Quiz 6 after you have finished the largest part of your studying, not before.