Exercises allow students to apply new material and practice programming.
We also welcome contributions – exercises, links, sample code, teaching hints, or grading scripts – and we'll pass on revenue your exercises generate. Get in touch to learn more.
Students will be exposed to some of the powerful ideas underlying programming. They'll also have the opportunity to think creatively, reason logically, and work collaboratively.
|One-player pong||scratch, variables, objects||Student approved|
Students will be able to create, manipulate, and store data inside their programs. They'll also gain confidence in tracing through code inside a single method.
|Slippery slopes||doubles, variables, basic math||Student approved|
|Tricky dice||ints, random, control statements||Idea sketch|
|Titlecase||strings, variables, string manipulation||Polish needed|
|Casting spells on numbers||int, double, casting||Polish needed|
|Magic 8 ball||random, arrays||Student approved|
|Loop exercises||strings, for loops, printing||Student approved|
|Factorial project||for loops, nested loops||Student approved|
|FizzBuzz||strings, for loops, mods, if statements||Student approved|
|Statistics||ints, basic math||Student approved|
|Statistics and Histograms||ints, basic math, strings, printing||Student approved|
Students will be able to create, manipulate, and store data inside arrays. They'll also gain confidence in tracing through those arrays.
|Array exercises||basic math, arrays||Student approved|
|Array fun||basic math, arrays||Student approved|
|Array fun with strings||basic math, arrays, strings||Student approved|
|Array practice||numbers, loops, arrays||Student approved|
Students will be able to write functions/methods, and they'll gain confidence in tracing through control flow across multiple functions.
|Pythagorean Theorem||doubles, variables, functions||Student approved|
|Rock, Paper, Scissors||random numbers, strings, user input||Student approved|
|Compact data||ints, arrays, methods||Student approved|
|Scramble words||strings, for loops, functions||Student approved|
|Fractional Calculator||string manipulation, user input||Student approved|
|Bunnies||for loops, recursion||Student approved|
|Recursion exercises||recursion, basic map, string manipulation||Student approved|
Students will continue to write functions/methods, now with the added challenge of tracing through control flow across multiple function/methods.
|On a roll||for loops, functions, arrays||Student approved|
|Measuring that roll||arrays, for loops, if statments||Student approved|
|Scramble or remove||strings, for loops, functions, arraylists||Student approved|
|It's raining hailstones!||if statements, while loops, logical operators||Student approved|
|Car rentals||if statements, for loops, strings, mods||Student approved|
|Apple, cherry, or pumpkin?||if statements, for loops, doubles, functions||Student approved|
|Treasure hunt||2d arrays, if statements, for loops, printing||Polish needed|
Students will experiment with classes as "conceptual containers," used to separate dissimilar parts of program, without writing their own classes.
|Caesar ciphers||characters, strings, for loops||Student approved|
|Do you need an umbrella?||random, external classes, if statements||Polish needed|
|Seating Charts||arraylists, 2d arrays, for loops, if statements||Student approved|
|Seating Charts 2||arraylists, 2d arrays, for loops, if statements||Student approved|
|Input validation||for loops, strings, java swing||Student approved|
Students will design, implement, and use classes on their own. They'll be challenged to reason about which data belongs in which class.
|Bitcoin||arraylists, classes, final, compareTo||Polish needed|
|Making Change||classes, casting, strings||Student approved|
|Mode Histogram||classes, strings||Student approved|
|Restaurant systems||if statements, for loops, printing, classes, program design||Student approved|
|Message in a bottle||classes, visibility, arraylists||Polish needed|
Students will be able to design, implement, and use their own classes that make use of object-oriented programming principles and inheritance.
|Lunch Special||classes, interface, constructors||Student approved|
|Chattering Chatterbot||classes, inheritance||Polish needed|
Students will be able to understand code that they didn't write, and they'll also be able to modify it to achieve their own ends.
|Polygons||classes, inheritance, interface||Student approved|
|Land mine||MVC, messaging, objects||Student approved|
|The Watchmaker||classes, debugging, code composition||Idea sketch|
|Interfacing with playing cards||compareTo, classes, inheritance||Idea sketch|
Students will be able to design, implement, and write code to a specification so that someone else can adopt what has been written to his or her ends.