Functional Problem Solving (CSC 151 2015S) : EBoards

CSC151.01 2015S, Class 12: A Design Perspective


Overview

Preliminaries

Admin

Upcoming Work

Extra Credit Opportunities

Academic

Miscellaneous

Peer Support (Afternoon Section)

Recommended, But no EC

Questions

What's the difference between a drawing and an image?

A drawing is a conceptual thing; it's a collection of colored ellipses and rectangles. An image, in contrast, is a reference to GIMP's rendering of something visual.

How many tests is enough?

Make sure that you cover all the cases, but each test can cover multiple cases. I would guess that ten different tests would suffice.

Getting the rectangles on top of the image is challenging. Any hints?

See the exam for hints.

_What's the relationship between hshift-drawing and drawing-hshift.

It's just the order of parameters. (hshift-drawing AMT DRAWING) vs. (drawing-hshift DRAWING AMT). It's a matter of taste which you use.

Should we show you our experiments?

Yes.

Copy from the interactions pane. Paste into the definition pane. Select. Then comment out with semicolons (under the Racket menu).

Is there a procedure for finding the center of a shape?

Yes.

http://www.cs.grinnell.edu/~rebelsky/Courses/CSC151/2015S/labs/rackunit-drawings-lab.html

http://www.cs.grinnell.edu/~rebelsky/Courses/CSC151/2015S/eboards.am/extra.03.html

Can we give you multiple versions of a procedure in the hope that you will find one more to your liking?

If you indicate that the less correct ones are incorrect, yes.

About Quiz 3

Problem 1: Find the difference between a number and the square of its square root

    (define error-root-squared
      (lambda (number)
        (- number (square (sqrt number)))))

    (define error-root-squared
      (lambda (x)
        (- x (* (sqrt x) (sqrt x)))))

    (define error-root-squared
      (lambda (val)
        (- val (expt (sqrt val) 2))))

Problem 2: Given lots of weird code, figure out what it does.

(define circ
  (hshift-drawing 0.5 (vshift-drawing 0.5 drawing-unit-circle)))

A bit about design

A bit about color theory

Exploring some images and design spaces