Two sessions. You choose what to make. A console program or a Raylib program — your call.
Every activity so far has told you what to build. This one does not. Quarter 1 gave you input, arrays, decisions, and loops, and Activities 2.1 through 2.4 added methods with parameters. That is the complete set of ingredients the Create task asks for, so this is the first point in the course where a real project of your own is possible.
The scope rule: a person could use the finished thing in under two minutes. This is a rule, not a suggestion. A plan that breaks it does not get approved.
The worked examples on this page are taken. The Study Break Picker and the Night Sky exist to show you the shape and the size of a good project. Build something else.
No video. No written reference. Those belong to Build 2 and to the Create task. This one is just the program.
'F' → Fullscreen
These are four of the six requirements the Create task will ask for in Quarter 3, in the same words. The Create task is written for every language, so it says list where C# has an array and procedure where C# has a method.
Console.ReadLine(), usually inside int.Parse. In Raylib it is a key check such as Raylib.IsKeyPressed(KeyboardKey.Space), the way Raylib Labs 3 through 6 used them.if, and a loop — all three between that method's own braces.Two more come almost free once you have those four. Your method gets called — and if it does not, C# warns you with CS8321: The local function 'Suggest' is declared but never used, the warning from Activity 2.1. And your program produces output based on the input. Check both anyway.
Requirement 4 is the only one you can appear to satisfy and still lose the point. Here is the deck's break picker again. It has input, two arrays, a loop, an if, and a method with a parameter, and it runs:
string[] breaks = { "Stretch", "Walk outside", "Power nap" };int[] minutes = { 5, 15, 25 };
Console.Write("How many minutes do you have? ");int free = int.Parse(Console.ReadLine());
for (int i = 0; i < breaks.Length; i++){ if (minutes[i] <= free) { Suggest(breaks[i]); }}
void Suggest(string name){ Console.WriteLine($"You could: {name}");}How many minutes do you have? 20You could: StretchYou could: Walk outsideIt still fails requirement 4, because the loop and the if are in the main program, outside Suggest. Between that method's braces there is one line, and it is neither. The main program is a main method, which the College Board does not count as yours, so the loop and the if there earn nothing.
The fix is not to add anything. It is to move the loop and the if inside the method and pass the user's number in as the parameter.
string[] breaks = { "Stretch", "Walk outside", "Power nap" };int[] minutes = { 5, 15, 25 };
Console.Write("How many minutes do you have? ");int free = int.Parse(Console.ReadLine());
Suggest(free);
void Suggest(int limit){ Console.WriteLine($"With {limit} minutes:"); int found = 0;
for (int i = 0; i < breaks.Length; i++) { if (minutes[i] <= limit) { Console.WriteLine($" You could: {breaks[i]}"); found = found + 1; } }
if (found == 0) { Console.WriteLine(" Nothing fits."); }}How many minutes do you have? 20With 20 minutes: You could: Stretch You could: Walk outsideHow many minutes do you have? 3With 3 minutes: Nothing fits.Inside Suggest now: a heading and a counter that just run (sequencing), a for loop (iteration), and two ifs (selection). The counter is doing real work, too. It is what lets the second if say “Nothing fits” when the user types 3, where the first version printed nothing at all.
Raylib makes requirement 4 easier to miss, because a Raylib program is already full of loops and decisions. The while loop that keeps the window open and the key checks inside it are all part of the main program, and none of them count. Your own method needs its own loop and its own if.
Here is the shape, from a small program that draws a sky of stars and lets the Up and Down keys decide how many shine. The bodies are left out on purpose.
while (!Raylib.WindowShouldClose()){ // Up and Down change shining. That is the input, // and it belongs to the main program.
Raylib.BeginDrawing(); Raylib.ClearBackground(Color.Black); DrawSky(shining); Raylib.EndDrawing();}
Raylib.CloseWindow();
void DrawSky(int count){ Raylib.DrawText($"{count} stars shining", 20, 410, 20, Color.Gray);
for (int i = 0; i < starX.Length; i++) { if (i < count) { // ... a bright star at starX[i], starY[i] } else { // ... a dim one } }}count decides how many stars are bright, so it changes what the method draws. Between DrawSky's braces there is a line that just runs, a loop over the star arrays, and a decision. That is requirement 4 in Raylib.
Before you submit, do this one check. Find your method. Put your finger on its opening brace and its closing brace. Between those two marks, can you point at a statement that just runs, a loop, and an if? If not, restructure now — it is much cheaper today than it will be in Quarter 3.
You do not have to use one of these. They exist to show the size we are aiming for, and every one can be built with arrays and the tools you already have.
% from Activity 1.6 does the dealing.bool array of which are hit, like Raylib Lab 6's invaders; the method draws only the targets still standing.Every one of these passes the two-minute rule, and every one of them has an obvious array and an obvious method. That is not an accident — it is what a well-scoped project looks like.
Choosing Raylib means finishing in class. Juicemind runs console programs only, so a Raylib project cannot be worked on at home. One more reason to keep it small.
Twenty minutes, and no code until your plan is approved.
Write your plan on the sheet in prose pseudocode — numbered plain-English steps, detailed enough that someone else could write the program from them. Not C#, and not exam notation either. Plain sentences, in order.
Program: <name>What it does: <one sentence>
Input: <what you ask for, or which keys>Array: <its name, and what is in it>Method: <its name, and its parameter>Inside it: <the loop, and the decision>
Steps:1. ...2. ...Program: Study Break PickerWhat it does: you say how many minutes you have,and it prints the breaks that fit.
1. Make an array called breaks holding break names.2. Make an array called minutes holding how long each one takes, in the same order.3. Write a method FitsIn(limit): a. Print a heading that includes limit. b. Set a counter called found to 0. c. Loop over every position in the two arrays. i. If the minutes at that position are less than or equal to limit, print the name and the minutes, and add 1 to found. d. If found is still 0, print "Nothing fits."4. Ask the user how many minutes they have.5. Call FitsIn with that number.Read step 3 again. The method has a parameter, and inside its body there is a heading and a counter (sequencing), a loop over the arrays (iteration), and two decisions (selection). All four requirements are visible in the plan, before a single line is written. That is what the gate is checking for.
Program: Study PlannerWhat it does: keeps track of all my classes andassignments and tells me what to work on.
1. Let the user add a class.2. Let the user add an assignment with a due date.3. Save everything so it is still there tomorrow.4. Show a calendar for the week.5. Sort the assignments by how urgent they are.6. Let the user check things off.This is a good idea and a bad plan. Step 3 needs files, which nothing in the course has taught. Steps 1, 2, and 6 each need their own loop of questions, and an array cannot grow each time the user adds something. And nobody uses it in under two minutes — typing in your classes alone takes longer than that.
The giveaway is that it never names an array, a method, or a parameter. A plan that cannot name those is not finished, however good the idea is.
If your plan gets sent back, that is the system working. The whole reason Build 1 is two sessions long is so that finding this out is cheap.
| What | Points |
|---|---|
| Scoping plan written in prose pseudocode and approved at the gate | 8 |
| Input — the program asks for something and uses the answer | 4 |
| An array the program actually needs | 6 |
| A method you wrote, with a parameter that changes what it does | 8 |
| Sequencing, selection, and iteration inside that method's body | 8 |
| Share-out — read your plan, said what actually happened | 6 |
| Total | 40 |
Notice what is not on this list: how ambitious the idea was, and whether everything you planned got finished. A project that got cut in half and works loses nothing here.
Three things go to the dropbox: