CS 128
Sign in

CS 128 AL1 and AL2: Introduction to Computer Science II

A rigorous introduction to programming.

CS 128 AL1 and AL2 prepares you for the demands of later coursework and an increasingly competitive field. You will learn to design, write, test, and debug C++ programs, developing the understanding needed to explain your decisions and work through unfamiliar problems. The course requires sustained practice; lessons, programming activities, and larger projects build your skills throughout the semester, with support from course staff along the way.

Majors and non-majors are welcome. To take the course described on this page, register for CS 128 section AL1 or AL2.

Run a C++ program

#include <iostream>

int main() {
  std::cout << "Howdy, and welcome to CS 128 AL1 and AL2!" << std::endl;
  std::cout << "We are ";
  for (int i = 0; i < 4; ++i) {
    std::cout << "so ";
  }
  std::cout << "excited you're here." << std::endl;
  return 0;
}

Change the loop condition, then select Run. The browser compiles and runs your C++ program; compare the output before and after your change.

How a typical week is organized.

Each week, you will complete two lessons and their programming activities, followed by assigned practice problems the next day. Weekly recitations provide time to work with a small group.

Tentative schedule for Spring 2027

  1. MondayLesson and graded programming activity
  2. TuesdayAssigned practice problems covering Monday's lesson
  3. WednesdayLesson and graded programming activity
  4. ThursdayAssigned practice problems covering Wednesday's lesson
  5. FridayRecitation section meeting
    Quiz window opens

Both the lesson programming activity and assigned practice problems count toward your grade. Additional ungraded problems are available for further practice. The machine problem schedule is still being determined.

The course is changing substantially for Spring 2027. To see how it ran before, review topics, policies, and schedules from previous semesters in the archives.

Practice in every lesson.

Programming is a skill that develops through sustained practice. In CS 128 AL1 and AL2, you will write code throughout the week, refining your ability to turn an approach into a working program, test your decisions, and work through errors. This repeated practice prepares you for problems that require you to combine concepts and apply them in unfamiliar situations.

Our learning platform combines explanations with runnable C++ examples, code walkthroughs, interactive components, and autograded programming problems. You can change code, trace its execution, and apply what you have learned without leaving the lesson. Across the lessons, you will find over 250 autograded programming problems; some contribute to your grade, while others are ungraded and available for additional practice should you want it.

925 programming problems, runnable examples, code walkthroughs, and interactive components in the Fall 2026 lessons
  • 259 autograded programming problems
  • 227 runnable examples
  • 53 code walkthroughs
  • 386 interactive components

Practice and support throughout the semester.

Lessons and programming practice

Two lessons per week beginning in Spring 2027

Each lesson introduces a topic and includes a graded programming problem or activity. Lessons are asynchronous, so you can work through the material around course deadlines and return to explanations and examples as you practice.

Machine problems

At least four per semester

Machine problems are larger programming projects that combine concepts from multiple lessons. As the semester progresses, these projects increase in complexity, requiring you to make more decisions about how to organize, implement, and test your programs. This work prepares you to approach larger, unfamiliar problems in later coursework and professional settings.

Weekly quizzes

With second-chance quizzes

You will take weekly quizzes at the Computer-Based Testing Facility (CBTF). Every quiz is an opportunity to demonstrate what you have learned and improve your grade on the previous quiz. Because the material is cumulative, if you earn a higher score on the current quiz, we raise the previous quiz grade to 90% of the current quiz score plus 10% of the earlier quiz score.

Weekly recitations

Work with a smaller group each week

Each recitation begins with a short presentation, followed by a programming activity in small groups. You will discuss approaches and work toward a solution together, using autograder feedback to test and revise your code. Your grade reflects your collaboration.

Office hours

In person and online, most days of the week

Office hours begin in person at the Siebel Center Tutoring Center and continue online. Join the queue to work with a member of the course staff, whether you need help understanding a concept, considering an approach, or investigating an error in your code.

Additional programming opportunities.

Even More Practice Sessions

Monday through Thursday evenings

Each evening, we will work through the graded programming problems assigned that day, discussing approaches and explaining the decisions involved in developing a solution. You can register for an additional pass/fail credit hour or attend without registering.

CS 128 Honors

Develop your programming skills with Rust

Build on CS 128 AL1 and AL2 with Rust, which offers performance similar to C++ with stronger memory safety guarantees. You will study ownership and borrowing, error handling, traits and generics, and algebraic data types, applying these concepts in programming assignments and a group final project.

Use AI to reason through programming problems.

You will work with AI as a programming partner to discuss approaches, examine code, and investigate errors. These exchanges require you to explain your reasoning, question assumptions, and test proposed changes. This builds on the work in CS 124, extending those practices to larger programs and more complex programming problems.

YouMy destructor crashes when the list is empty. Should I add if (head_ == nullptr) return; at the top?
AIWhat does your loop do when head_ is nullptr? Check its condition and the first pointer it dereferences.
YouIt accesses head_->next before checking whether head_ is nullptr. I will revise the loop condition and test the destructor with empty and non-empty lists.

Take a break. Steer a linked list.

This snake represents a singly linked list: each node points to the next, and eating a byte adds a node. Use the arrow keys or WASD to steer, and keep the list from running into itself.

./snake length 3, best 3

This snake is a linked list.
Every byte it eats allocates a node.

Arrow keys or WASD. Swipe on a phone.

Meet your instructor.

Michael Nowak

Michael Nowak PhD

Teaching Assistant Professor, Siebel School of Computing and Data Science

I am Prof. Nowak, and I teach CS 128 AL1 and AL2. After joining Illinois in 2020, I designed and implemented CS 128 from the ground up, introducing it into the curriculum to connect our first programming course with data structures. I take the expectations of this course seriously, along with my responsibility to help you meet them.

  • Ph.D., Computer Science, Texas A&M University, 2019
  • B.S., Neuroscience and Computer Science, Trinity University, 2012

Access the course materials.

If you are enrolled, sign in to access your lessons, activities, and office hours.

For free C++ lessons, visit learncpp.online.