Functional Problem Solving (CSC 151 2016S) : EBoards

CSC151.02 2016S, Class 12: Testing Your Procedures


Overview

Preliminaries

Admin

Reminders

Upcoming Work:

Extra Credit

Academic

Peer

Regular Peer

No Extra Credit, But Still Good

Questions

How many errors have my peers discovered?

Three. Two found by students in my section. One by a student in Charlie's section. All of the errors are my fault.

Should I type my responses to the prologue in a Google doc and then copy and paste into the form so that I still have a record?

Yes.

But Sam will send it to you if you ask.

How much detail do I have to include in the prologue?

The more detail you include, the better it is for you.

Preferred: "This is similar to the first problem on homework 3, except that I want to substitute something else for the components."

Preferred: "Use sectioning with the irgb-add procedure and the irgb-subtract procedure. Need to figure out how much to add and subtract."

Acceptable: "Review the reading on sectioning."

Unacceptable: "No idea."

Unacceptable: "dsafdj;afsdj;adfsj;abasdvjlvsa"

Section

As programmers, we want to write procedures.

Sometimes, we're really lucky, and we have existing procedures that are pretty close to what we want, but they are too general.

There's this cool procedure, (expt base power) raises the base (a real number, or maybe any number) to the given power (which is a real number).

Assume we want to square. That's expt, with the power fixed at 2.

We write

    (define square (section expt <> 2))

Now

    (square 5)

We can have multiple diamonds in the same section

    (define reddish (section irgb 255 <> <>))

The diamonds can refer to any type.

    (define redder (section irgb-add <> (irgb 64 0 0)))

Exam Questions

Do we need to document the color palette procedure?

No.

What's the cover sheet?

A piece of paper with the requisite info.

Won't the citations reveal too much info?

Quiz

When you are done with the quiz, please turn your quiz over and either sit quietly or play quietly on an electronic device until your partner is done.

When your partner is done, please start the lab.

Lab

Start the lab. We will finish on Monday.

Writeup (for Tuesday): 3 a and b.