02 Module Lab

Data
Arrays
.java

A playground for Java logic. Break algorithms, sort data, save teacups, and deconstruct code through interaction. Explore every corner to sharpen your Java fundamentals.

Arrays
Text I/O
Recursion

ArrayLists
Data Manipulation
Teacup coder
Java — sipping & shipping

the playground

Click any card to start experimenting:

12 demos
Hangman thumbnail
// arrays

Hangman

Guess the hidden word before your brew's over! Test your vocabulary and logic skills in this classic word-guessing game.

Launch
🔒👣²🔓
// arrays

100 Lockers

There are 100 lockers, all initially closed. Students visit every nth locker for n from 1 to 100, toggling their state. Which lockers remain open?

Launch
🔢👀⬇️🔄📈
// data

Selection Sort

An unsorted array sits there, full of potential chaos. The algorithm locks eyes on the entire unsorted region, hunts down the smallest value hiding anywhere in it, then drags that value to the front by swapping it into place. With every hunt completed, one more number is cemented at the beginning — the sorted zone creeps rightward until nothing disorderly remains. Watch how relentlessly it builds order from the left.

Launch
🔢✂️⬇️🔗📊
// data

Merge Sort

Take the entire unsorted list and keep slicing it in half until every piece contains just one element — trivial, already “sorted.” Then reverse the process: merge neighboring sorted pieces by comparing their smallest values and building a new sorted sequence from them. Keep merging larger and larger blocks until the whole array has been reconstructed in perfect order. Observe how breaking chaos into atoms and then carefully recombining them produces flawless structure.

Launch
🔢🃏⬅️🔄📈
// data

Insertion Sort

Start with an unsorted list. Grab the next number that hasn’t been placed yet. Slide it backward through the already-ordered prefix until you find the exact slot where it belongs — shove larger elements right to open the gap, then drop it in. Repeat. The sorted region expands steadily from the left like a hand of cards being neatly arranged as each new one arrives. See how naturally disorder turns into sequence with every insertion.

Launch
🔗➕📦⛓️
// arraylists

ArrayLists

Explore the dynamic nature of array lists as elements are added and removed, maintaining a flexible structure for efficient data management.

Launch
Recursion thumbnail
// recursion

Recursion

A function fearlessly calls itself on tinier versions of the same problem, diving deeper and deeper until it slams into a dead-simple base case that just hands back the answer. Then — magic — every nested call unravels in reverse, snapping small solutions together until the original giant puzzle is elegantly cracked wide open!

Launch
🔢🧮⚖️📊
// arrays

Math Operations

Perform mathematical operations on array elements: Mean, Median, Mode, Standard Deviation, Max, Min, Unique Elements

Launch
Text I/O thumbnail
// text I/O

Text I/O

The program reads what the user types using Scanner and turns it into strings, numbers, or lines. Then it writes to a file that stays after the program finishes suing PrintWriter. But beware of exceptions - be sure to handle them properly.

Launch
🧩⤴️
// arrays

Merge Arrays

Combine two or more arrays into a single array - taking all the elements from each input array - and putting them into the sorted merged array.

Launch
📚📝
// arrays

Grades

The class's grades are in this array of doubles - let's anaylze them and see how hard the test was!

Launch
↔️🔀
// arrays

Shift and Shuffle

Move elements within an array left or right, or rearrange them in a random order.

Launch