Computer Science
>
>

CS 106B Programming Abstractions

Winter 2023

Stanford University

This course helps transition from coding to problem-solving using computers. The course explores techniques, tools, and models for problem-solving across disciplines using C++. Prior programming experience is assumed.

Course Page

Overview

A nonprofit needs to assign tasks to its volunteers so they get completed as fast as possible. A political scientist wants to determine how to allocate city council seats based on a popular vote. A climatologist wants to estimate how many trees are in a forest. A city planner wants to see whether a proposed development will be underwater as sea levels rise. A physicist wants to know why perturbations to a system cause cascading effects.

How can we use computing power to answer these questions?

This course is about transitioning from “I know how to write programs” to “I know how to solve problems with computers.” Over the course of ten weeks, we’ll explore an array of techniques, tools, and perspectives useful for modeling and solving problems. We’ll explore recursion and see how it can be used both to model the intricacies of nature and to optimally allocate resources. We’ll develop a rich vocabulary of structures that can both capture the position of a dancer in space and compress a data file. And we’ll see how to put these techniques to use in problems drawn from a range of disciplines. By the time you’ve completed this course, you’ll learn how to look at problems in fundamentally different ways and how to use those perspectives to create clean and elegant computational solutions.

Prerequisites

CS106B assumes that you have a familiarity with programming at the level of CS106A or the AP Computer Science exam. Check out our course placement page for more information about deciding whether CS106B is right for you. As always, feel free to get in touch with us if you have any questions.

A note: although this class uses C++, this class is primarily designed to teach abstraction, recursion, and algorithmic analysis. If you already know those topics and just want to learn C++, you may want to opt to take CS106L instead of CS106B.

Learning objectives

No data.

Textbooks and other notes

The required reading for this course is Eric Roberts' Programming Abstractions in C++. You can purchase a copy at the bookstore using this link:

https://www.bkstr.com/stanfordstore/search/keyword/programming%2520abstractions

You can also use this online version, which is a 2012 draft version of the book.

https://web.stanford.edu/dept/cs_edu/resources/textbook/

We assume that the majority of you have no prior programming experience in C++, and this textbook is a great resource to use at the start of the quarter as you’re transitioning into the language.

A helpful note from the School of Engineering:

“All students should retain receipts for books and other course-related expenses, as these may be qualified educational expenses for tax purposes. If you are an undergraduate receiving financial aid, you may be eligible for additional financial aid for required books and course materials if these expenses exceed the aid amount in your award letter. For more information, review your award letter or visit the Student Budget website.”

Other courses in Computer Programming

Courseware availability

Lecture slides and codes available at SCHEDULE

No videos available

Assignments available at ASSIGNMENTS

Sections available at SECTIONS

Practice problems available at PRACTICE PROBLEMS

Resources available at RESOURCES

Covered concepts