KotlinCS 124 LogoJava
PrevIndexNext
Kotlin
Java
  • Implementing a Map : 04/26/2024

  • Streams : 04/25/2024

  • Generics : 04/24/2024

  • Hashing : 04/23/2024

  • Binary Search : 04/22/2024

  • MP3: Course Ratings : 04/19/2024

  • Quicksort : 04/18/2024

  • Merge Sort : 04/17/2024

  • Sorting Algorithms : 04/16/2024

  • MP Debugging Part 1 : 04/15/2024

  • MP2: Course Activity : 04/12/2024

  • Practice with Recursion : 04/11/2024

  • MP Debugging Part 0 : 04/10/2024

  • MP2: API Client : 04/09/2024

  • MP2: API Server : 04/08/2024

  • Trees and Recursion : 04/05/2024

  • Trees : 04/04/2024

  • Recursion : 04/03/2024

  • MP1: Filtering and Search : 04/02/2024

  • MP1: Loading and Sorting : 04/01/2024

  • Lists Review and Performance : 03/29/2024

  • Linked Lists : 03/28/2024

  • Algorithms and Lists : 03/27/2024

  • Continuing MP0 : 03/26/2024

  • Getting Started with MP0 : 03/25/2024

  • Lambda Expressions : 03/22/2024

  • Anonymous Classes : 03/21/2024

  • Practice with Interfaces : 03/20/2024

  • Implementing Interfaces : 03/19/2024

  • Using Interfaces : 03/18/2024

  • Working with Exceptions : 03/08/2024

  • Throwing Exceptions : 03/07/2024

  • Catching Exceptions : 03/06/2024

  • References and Polymorphism : 03/05/2024

  • References : 03/04/2024

  • Data Modeling 2 : 03/01/2024

  • Equality and Object Copying : 02/29/2024

  • Polymorphism : 02/28/2024

  • Inheritance : 02/27/2024

  • Data Modeling 1 : 02/26/2024

  • Static : 02/23/2024

  • Encapsulation : 02/22/2024

  • Constructors : 02/21/2024

  • Objects, Continued : 02/20/2024

  • Introduction to Objects : 02/19/2024

  • Compilation and Type Inference : 02/16/2024

  • Practice with Collections : 02/15/2024

  • Maps and Sets : 02/14/2024

  • Lists and Type Parameters : 02/13/2024

  • Imports and Libraries : 02/12/2024

  • Multidimensional Arrays : 02/09/2024

  • Practice with Strings : 02/08/2024

  • null : 02/07/2024

  • Algorithms and Strings : 02/06/2024

  • Strings : 02/05/2024

  • Functions and Algorithms : 02/02/2024

  • Practice with Functions : 02/01/2024

  • More About Functions : 01/31/2024

  • Errors and Debugging : 01/30/2024

  • Functions : 01/29/2024

  • Practice with Loops and Algorithms : 01/26/2024

  • Algorithms : 01/25/2024

  • Loops : 01/24/2024

  • Arrays : 01/23/2024

  • Compound Conditionals : 01/22/2024

  • Conditional Expressions and Statements : 01/19/2024

  • Operations on Variables : 01/18/2024

  • Variables and Types : 01/17/2024

  • Welcome to CS 124 : 01/16/2024

Welcome to CS 124

System.out.println("Welcome to CS 124!");

Welcome to CS 124! Your journey in computer science and programming starts now. We are so excited that you are here.

You Are Not Alone
You Are Not Alone

CS 124 has the best course staff on campus. Our fantastic team will be with you every step of the way.

Learning computer science and programming is not always easy. Learning anything is not always easy!

You will get frustrated along the way. But you won’t need to struggle alone. Our course staff will always be there for you to offer help, support, empathy, encouragement, and lots of love. You can do this! We can help.

How CS 124 Works
How CS 124 Works

CS 124 consists of daily lessons and homework (20%), weekly quizzes (50%), and a longer Android programming project that we will release in the second half of the semester (30%).

All course policies and procedures are fully documented in the syllabus. You should review that document and refer to it when needed. This section provides only a brief overview.

Course Design
Course Design

CS 124 has some unique aspects:

We’ve documented these on the syllabus, and will elaborate on them more in the week ahead. Every aspect of the design of the course has been carefully considered, and all work together to support high rates of student success.

Lessons and Homework
Lessons and Homework

This semester you’ll work through one lesson per day—just like this one. Lessons combine text, videos, code examples, and interactive walkthroughs. Interspersed are small programming exercises and debugging challenges for you to complete.

We expect you to work through each day’s material on your own time. Don’t fall behind! Programming is a skill, best learned bit by bit, one day at a time. However, you may work a few days ahead, which can be helpful in case you need to take a few days off. You should also use this flexibility to plan around any absences.

Quizzes
Quizzes

Each week you’ll take a quiz in our computer-based testing facility (CBTF). CS 124 quizzes will run from Monday through Wednesday of each week. Schedule your quiz using the CBTF scheduling site.

Quizzes cover the material taught since the last quiz, which usually means the previous week of lessons. If you have reviewed the lesson content and completed all of the homework and practice problems and debugging challenges, you will be well-prepared.

To help you prepare for each week’s quiz, we will post a practice assessment on our quiz page. The practice quiz will have multiple-choice questions and programming and debugging challenges similar to those you’ll need to answer on the real quiz. Completing the practice quiz is a great way to prepare!

Note that your first CS 124 quiz starts today (Tuesday 1/16/2024) and runs through Wednesday 1/17/2024. Please review announcements on the forum for more details about how to take your first quiz. Your first quiz is on syllabus material, and every question can be answered an unlimited number of times for full credit. All to say: it’s an easy 100 out of 100! Please don’t miss it.

Machine Project
Machine Project

Around halfway through the semester we’ll release a larger multi-part Android programming assignment for you to work on called the machine project. The MP helps you continue to grow as a programmer and computer scientist by challenging you to complete a larger programming project—an entire Android app. We’ll get there! But let’s learn the basics first!

Support Resources
Support Resources

Learning to program is both fun and challenging, and CS 124 moves steadily. But as we challenge you, we support you. Every step of the way.

Tutoring Site
Tutoring Site

CS 124 course staff are available for one-on-one help during scheduled hours using through the help site. The video above provides a brief demo. This is usually your best first step when you need help with your code.

Forum
Forum

You may also ask questions on our course forum. The forum is a nexus of course activity and information, with staff and students available day and night to answer questions, commiserate, offer support, and engage in meme appreciation.

Discussion Sections
Discussion Sections

Tuesday discussion sections are optional. Attendance is not required. Today (Tuesday 1/16/2024) you’ll have an opportunity to ask questions of the course staff and get to know some of your fellow students.

During subsequent weeks we’ll have staff available for individual support and tutoring. Space-permitting, all discussion sections are open to all students. However, please plan on attending at your assigned discussion time if possible.

Calendar
Calendar

In addition to the lesson content, CS 124 many other ways that the staff help support you on your journey. Our calendar is the place to look for other course events.

Lesson Components
Lesson Components

Our lessons contain a mixture of different types of content. Some of each lesson will be text, like what you’re reading.

Playgrounds
Playgrounds

We also use a lot of interactive examples, like this one:

System.out.println("Play with me!");

These playgrounds are editable and runnable. They are here for you to play with. Run them, modify the code, run them again. You’ll learn to program much faster by experimenting.

When working on larger examples your changes will automatically be saved, but you can always return to the original contents. You’ll know that an editor is saving your work when you see the green check mark in the upper right-hand corner, like this:

System.out.println("Play with me!");

Interactive Walkthroughs
Interactive Walkthroughs

Sometimes we want to talk you through how to do something using code. In that case, we’ll provide an interactive walkthrough, which combines audio with an animated editor. This feature is unique to CS 124.

Here’s an example.

System.out.println("Hello, world");

You may pause the walkthrough at any point to experiment with the code, and then pick up right where you left off.

Many of our walkthroughs include contributions from multiple course staff members. Confused? Try another explanation! Still confused? Ask on the forum or tutoring site.

Video Content
Video Content

Finally, we’ll also sometimes use video to explain a concept or make a particular point. Or, for the staff to introduce some of their pets!

Practice Problems
Practice Problems

Mixed in to each lesson you’ll find practice problems, like the one below. Solutions to the practice problem will be available once you’ve attempted it a few times. These problems will help test your understanding as you go along, and prepare you for that lesson’s homework problem and related quiz questions.

Created By: Geoffrey Challen
/ Version: 2020.6.0

As we learn to communicate with these incredibly powerful machines, we frequently need them to tell us something about what they are doing as they run our program. We do this by using so-called print statements.

In Java, the programming language we'll be learning together, we use the function System.out.println to print a message to the console. The code below is already displaying a message. But to complete this problem you need to modify the code so that it prints "Hello, world!" (Note that you don't need to print the quotation marks, just what's between them.)

System.out.println("Hello, student!");

Debugging Challenges
Debugging Challenges

As you learn to write computer code, you’ll need to be able to identify and fix small mistakes with your programs. To give you more practice with this, lessons also include debugging challenges, like the one below. These give you practice at finding and identifying small mistakes in computer programs.


Who is Colleen Lewis?
Who is Colleen Lewis?

Throughout the lessons—particularly on the Java materials—you’ll find explanations from Professor Colleen Lewis. Colleen is not officially involved with CS 124 this semester, but she created a bunch of great content in Fall 2021 that we continue to use. In general feel free to explore explanations from multiple staff members, particularly if the first one you see doesn’t quite click.

What is Code?
What is Code?

We’ll be reading and writing a lot of Java computer code together this semester. But what is code?

Computers are incredibly powerful and versatile machines. If you can get them to do what you want, you can solve any problem and change the world. But how do we tell them what to do?

Here’s one of the simplest examples of a computer program—one so special that it has its own name: “Hello, world!“.

System.out.println("Hello, world");

Run the code above and see what happens. Now, play with the code. Experiment and see what happens. Maybe try and see if you can get the code to print something other than “Hello, world!“. See if you can break the code, and find out what happens when the code doesn’t run. Nothing bad will happen! But see if you can figure out what is wrong with the code based on the output produced by the computer.

Your First Homework Problem
Your First Homework Problem

Each lesson concludes with a homework problem to complete. Solutions to the homework problem will be available once you complete it, or once the deadline passes.

Homework Collaboration Policy
Homework Collaboration Policy

CS 124 now allows students to collaborate freely on the homework problems. Please see the syllabus for more details.

Created By: Geoffrey Challen
/ Version: 2024.1.0

As we learn to communicate with these incredibly powerful machines, we frequently need them to tell us something about what they are doing as they run our program. We do this by using so-called print statements.

In Java we use the function System.out.println to print a message to the console. The code below is already displaying a message. But to complete this problem you need to modify the code so that it prints "Hello, Spring 2024!" (Note that you don't need to print the quotation marks, just what's between them.)

System.out.println("Hello, world!");

CS 124 Honors
CS 124 Honors

Some of you may be interested in CS 124 Honors. It’s a fantastic experience! It also has its own website and sources of information. Please use those resources to ask questions about the class.

Here are the leads to pitch the course to you:

To sign up to find out more about CS 124 Honors, use this form.

More Practice

Need more practice? Head over to the practice page.