Back

Activity 3.4: The Personalized Project Reference

divider

Session 60

No building today. Today you make the short document you take into the exam in May.

Four of your six points are answered from this document and nothing else. You will not have your program on exam day, only four code segments on a desk.

You have done this once, as the practice reference at Build 2. The rules are the same, and this time they count. This is still inside the no-feedback window, so nobody, teacher or classmate, may help you with this document.

divider

Activity 3.4

The Personalized Project Reference

Key Concepts

Four Segments

Comments Are Documentation

Choosing Code You Can Talk About

What It Is

The four segments
PROCEDURE (i) the method itself
its name, its parameter, and an algorithm
with sequencing, selection and iteration
in its body
PROCEDURE (ii) where you call it
LIST (i) where data goes INTO the array
LIST (ii) where that same array's data gets USED

That is all of it: four pieces of your own program.

The Rules

The rules
THE PROJECT REFERENCE
no comments anywhere, in any segment
no course content no assignment text, no notes
at least 10 pt readable
not blurry
Comments or course content here = ZERO
on the whole Create task, including the four
written responses.

Comments Are Required, and Forbidden

Your program code PDF must include your comments. This reference must have none. Same code, submitted twice, one copy stripped.

That is not a contradiction. Comments are program documentation, written for people and ignored by the computer. In the program they are where you credit your sources. In the reference they would be notes carried into an exam.

Strip Them Carefully

How many comments? Count before the next slide.

Before
// total for one tier; tiers[] and prices[] stay in step
int PriceFor(int tier)
{
int total = 0; // running sum
for (int i = 0; i < prices.Length; i++)
{
if (tiers[i] == tier)
{
total = total + prices[i];
}
}
return total;
}

Strip Them Carefully

After
int PriceFor(int tier)
{
int total = 0;
for (int i = 0; i < prices.Length; i++)
{
if (tiers[i] == tier)
{
total = total + prices[i];
}
}
return total;
}

Two gone, including the one at the end of a line.

The One People Miss

Still a comment
int total = 0; // running sum

A comment on the same line as code does not look like a comment when you are scanning for whole lines. Look for every //, and every /*.

Now the Harder Question

Which four segments do you choose? The instinct is the best-looking code.

The right answer is the code you can answer four questions about. So test the reference against the prompts before you submit. A blank answer means you picked the wrong code, and today is the last day you can pick different code.

The Deadline, and No Second Chances

Miss the reference deadline and you do not get it on exam day: four questions about your own program, from memory.

And once a part is submitted as final, that is the version scored. There is no fixing it later. All three go together at session 61.

Today's Objectives

  • Assembling the four required code segments
  • Explaining what program documentation is and what comments are for
  • Removing every comment, including ones at the end of a line
  • Choosing segments by whether they can be written about
  • Testing the reference against all four written-response prompts

Key Terms

Program documentation
A written description of what code does and how it was developed.
Comment
Documentation written into the program, read by people, with no effect on how it runs.
Submitted as final
The state a part must reach to be scored. It cannot be revised afterward.

'F' → Fullscreen

divider

Today's Work

Task 1: Choose the Four Segments

  • Find each of the four in your program and note where it is.
  • Procedure (i) must have a parameter that affects what the method does, and an algorithm with sequencing, selection and iteration in its body.
  • List (ii) must show the array being used: new data made from it, or more than one element read. Storing data is List (i)'s job.

Task 2: Strip Every Comment

  • Whole-line comments, comments at the end of a line, and /* */ blocks.
  • Then read all four segments again, slowly, looking only for comments. Do it twice. Nobody else may check it for you.
  • Keep your commented version. The program code PDF needs it. You are making a second copy, not editing the original.

Task 3: The Self-Test

Before you submit anything
Cover your program. Look ONLY at your four segments.
WR1 Who is this for, and how does the design
meet their need? ____
WR2(a) How many times does the first loop in
Procedure (i) run? ____
What would make it run forever? ____
WR2(b) A change to that method causing a
run-time error, and why? ____
WR2(c) Using LIST (i)'s array -- count the
elements equal to a value. ____
Any blank means the wrong code is in your reference.
Today you can still change it.

A reference that cannot answer the four prompts is worth two points instead of six, and today is the only day you can change it. The College Board recommends exactly this check.


Task 4: Make the PDF

  • At least 10 pt, and not blurry.
  • Nothing on the page but your code: no headings copied from an assignment, no notes to yourself.
  • Read it once as a picture rather than as code, looking for anything that is not program code.
divider

Checkpoint

  • Four segments, correctly chosen
  • No comments, checked twice by you
  • All four prompts answerable from the reference alone
  • A readable PDF, 10 pt or larger

Do not submit as final until session 61, when all three parts go together. But it must be ready today.

divider

Submit

Your finished Project Reference, and your Task 3 self-test with every line filled in.

Activity Complete