Functional Problem Solving (CSC 151 2015S) : EBoards

CSC151.01 2015S, Class 30: Other Forms of List Recursion


Overview

Preliminaries

Admin

Upcoming Work

Extra Credit Opportunities

Academic

Peer Support (Afternoon Section)

Other Fun Activities

Questions

Can you help me think about the tests in problem 6?

You will need to write tests that use particular colors, colors which you will normally create with irgb.

Your main check is "Did irgb-classify classify it correctly?"

For example

    (define irgb-classify-tests
      (test-suite "Tests of irgb-classify"
        (test-case "tests of greenish colors"
                   (check-equal? (irgb-classify (irgb 200 201 200))
                                 'greenish
                                 "large, close, values; red=blue; green dominates"))
        (test-case "tests of reddish colors"
         )))

How many check-equal? calls are enough?

Minimum of 12. Maximum of 32,781. But closer to 12 is fine.

Do I have to write 6P-style documentation for irgb-classify or irgb-classify-tests?

No.

I'm getting a weird "quark" error in problem 8. Can you tell me why?

You are probably generating a y value outside of the valid range. Try generating the list of y values and scanning it for negative numbers or values greater than height-1.

Computers are sentient and malicious.

Lab

If I try to model largest on a procedure from the reading, what procedure should that be?

I like drawings-leftmost.

Do we have a daily lab pun?

You can rename irgb-all-bright? to irgb-secretary-of-state?