Activity Overview
This document describes the in-class activities used in exercise sessions:
- Memory Cards
- Multiple-Choice Quiz (Mentimeter)
- Parsons Problem
- Jeopardy
- Code Golf
- Instruction Budgeting
Memory Cards
Format: Small groups | Time: ~15 minutes | Group size: 2–4 students
Description
Students are given a set of face-down cards. Each card belongs to a pair: one blue card contains an item (a code expression, term, or fun fact) and one amber card contains its matching description, value, or answer. Students take turns flipping two cards at a time, trying to find matching pairs. The student with the most pairs at the end wins.
How to Play
- Shuffle the cards and lay them all face down in a grid.
- On their turn, a student flips any two cards face up.
- If the cards match (item + description), the student keeps the pair and goes again.
- If they do not match, both cards are turned face down and play passes to the left.
- The game ends when all pairs have been found. The student with the most pairs wins.
Example Card Pairs
| Item | Description |
|---|---|
| Compiler | A program that translates a high-level language program into a low-level language program |
a[0] | First element of a |
a.length | Number of elements in a |
Arrays.sort(a) | Sorts the elements of a |
| 23 people | 50% chance two people in a room share a birthday |
"Hi" + 3 | "Hi3" |
Practicals
The cards are printed on A4 paper with 4 cards per paper. This allows for cutting a stack of paper with two cuts to get the cards for a single game
Multiple-Choice Quiz (Mentimeter)
Format: Full class | Time: ~15 minutes | Group size: Individual
Description
An online, competitive quiz where students answer multiple-choice questions using their phones. Correct answers earn points, and faster answers earn more points. A leaderboard is shown between each question. The TA acts as host, presenting questions and discussing the answers after each round.
How to Play
- The TA opens the quiz and shares the game PIN on the projector.
- Students join by scanning the QR code on the projector (or typing in code).
- The TA starts the quiz. Each question has a timer (e.g. 20–30 seconds).
- After each question, the TA briefly explains the correct answer before moving on.
Example Questions
“What does this program print?”
int x = 3;
x = x + 2;
System.out.println(x);
- A)
3 - B)
5✓ - C)
x + 2 - D) Nothing — it doesn’t compile
“Which of the following is a valid variable declaration in Java?”
- A)
int 3x = 5; - B)
x int = 5; - C)
int x = 5;✓ - D)
x = 5 int;
Accessing the Mentimeter Quizzes
All the quizzes are accessible in this Mentimeter Workspace. Accessing the workspace requires that you make a Mentimeter account using your AU mail (auXXXXXX@uni.au.dk). If you have any issues accessing the Mentimeter workspace, please contact the Head TA.
Parsons Problem
Format: Small groups | Time: ~15 minutes | Group size: 2–4 students
Description
Students receive a set of code slips — individual lines or blocks of Java code — and must arrange them into a program that satisfies a given specification. The activity trains students to reason about code structure and control flow without the cognitive load of writing syntax from scratch.
Some slips may be distractors (plausible-looking but incorrect lines) to increase the challenge.
How to Play
- Each group receives a shuffled set of code slips.
- Read the specification aloud and display it on the screen/on the whiteboard.
- Groups arrange the slips until they believe they have a correct solution.
- Once done, groups can compare with a neighbour before the TA reveals the answer.
Example
Specification: Rearrange the slips to form a program that prints the factorial of n.
Slips (shuffled):
}
return answer;
int answer = 1;
System.out.println(mystery(5)); // distractor
for (int i = 1; i <= n; i++) {
answer = answer * i;
public static int factorial(int n) {
}
Solution:
public static int factorial(int n) {
int answer = 1;
for (int i = 1; i <= n; i++) {
answer = answer * i;
}
return answer;
}
Practicals
The problems are printed on A4 paper with dotted line between each slip. To minimise cutting, stack papers containing the same problem and cut along the dotted lines of the top-most paper.
Jeopardy
Format: Full class (teams) | Time: 20–30 minutes | Group size: 3–5 students per team
Description
A classic Jeopardy-style game where the TA presents a clue and students must respond in the form of a question. Categories correspond to course topics. Teams buzz in to answer; correct answers earn points and incorrect answers may cost points. The TA acts as host and judge.
Each week’s board is an interactive HTML page (jeopardy.html) that the TA
runs on the projector — see Interactive Board below.
How to Play
- Split the class into teams of 3–5 students; teams stay fixed for the duration of the game.
- The TA displays the board on the projector and adds the teams (team names are supported).
- Pick a team to start the game (for instance the first one listed).
- The team chooses a category and point value.
- The TA clicks on the corresponding cell and reads the displayed clue aloud.
- Teams buzz in (e.g. raising a hand, or making a distinct sound) as soon as they know the answer. The TA calls on whichever team buzzed first.
- The called team must respond in the form of a question within 5 seconds (e.g. “What is
int?”). The TA judges the response:- Correct: the team earns the clue’s points and picks the next category/value.
- Incorrect or no answer: the team loses the clue’s points (optional — the TA may skip penalties for a friendlier game) and the next team may attempt the same clue, buzzing in again.
- Once a clue has been answered (correctly or given up on), it is marked used and cannot be picked again. Play continues until every clue on the board has been used.
- The team with the highest score at the end wins.
Board Layout (Example)
| Category → | Data types | Control flow | Methods | OOP | Tracing |
|---|---|---|---|---|---|
| 100 pts | ★ | ★ | ★ | ★ | ★ |
| 200 pts | ★★ | ★★ | ★★ | ★★ | ★★ |
| 300 pts | ★★★ | ★★★ | ★★★ | ★★★ | ★★★ |
Example Clues
| Points | Clue | Expected question |
|---|---|---|
| 100 | Both positive and negative whole numbers have this type. | What is int? |
| 200 | These kinds of methods do not belong to an object. | What are static methods? |
| 200 | This keyword immediately exits a loop. | What is break? |
| 300 | When a method calls itself, it is using this technique. | What is recursion? |
| 300 | This OOP principle hides internal state and requires access through methods. | What is encapsulation? |
Interactive Board
The TA opens activities/weekN/jeopardy.html in a browser on the projector
laptop. Only the TA interacts with it — students just watch and call out
answers.
- Click a
$100/$200/$300cell to reveal its clue. Click “Show answer” if you want to display the answer text as well. - Click a team’s ✓ or ✗ button to award or deduct that clue’s points once you’ve judged the team’s spoken answer, or “Skip / no score” to move on without scoring. “↩ Put back” un-reveals a cell opened by mistake.
- The scoreboard at the bottom is always visible; team names are editable in place and teams can be added/removed with the buttons there.
- Progress and scores are saved in the browser’s local storage, so an accidental page refresh does not lose the game. Use the ⚙ Settings menu to reset scores or the whole board between classes.
- Works fully offline once the page is loaded — no server or internet connection is required during class.
Code Golf
Format: Individual or pairs | Time: 20–30 minutes | Group size: 1–2 students
Description
Students are given a programming specification and must implement it in as few characters as possible. Points are awarded inversely to character count: the shortest correct solution wins. The challenge pushes students to explore language features creatively and think about different ways to express the same logic.
How to Play
- The TA presents the specification on projector/whiteboard.
- Students have 15–20 minutes to write and refine their solution.
- Students report their solution’s character count (found with e.g.
wc -m); how solutions are collected is up to the TA - The shortest correct solutions are shown and discussed.
Example
Specification: Write a Java method that returns the factorial of n. Smaller is better.
A starting baseline (verbose):
public static int factorial(int n) {
int result = 1;
for (int i = 1; i <= n; i++) {
result = result * i;
}
return result;
}
A golfer’s attempt:
static int f(int n){return n<2?1:n*f(n-1);}
Tips for TAs
- Emphasize that unreadable code is bad practice in real life — the point is to explore the language, not to write production code this way. Uncle bob does not approve!
Instruction Budgeting
Format: Individual or small groups | Time: 20–30 minutes | Group size: 1–4 students
Description
Students receive a programming specification along with a strict budget constraining how many times they may use certain language constructs. The challenge forces students to think creatively about alternative approaches — e.g. using recursion instead of a loop when loops are scarce, or reorganizing logic to reuse assignments.
How to Play
- The TA presents the specification and budget on projector/whiteboard.
- Students implement the program, keeping track of their construct usage.
- Solutions are shared and discussed — there may be multiple valid approaches.
- Groups that find an unexpected solution explain their reasoning to the class.
Example
Specification: Implement a method that prints the factorial of n.
Budget:
| Construct | Allowed uses |
|---|---|
for loop | 1 |
while loop | 0 |
| Variable declarations | 2 |
Assignments (=) | 3 |
| Method calls | 1 |
One valid solution within budget:
public static void printFactorial(int n) {
int result = 1;
for (int i = 1; i <= n; i++) result *= i;
System.out.println(result);
}
A trickier budget might allow zero loops, nudging students toward a recursive solution.