![]() |
![]() |
|
home—lectures—exams—hws—breeze (snow day)
Due Sep.05 (Wed) (both hardcopy, and on Desire2Learn).
Your name and the assignment-number
must be in a comment at the start of the file.
Your hardcopy must be stapled.
We'll talk about test-cases (“
The exercises below are from the (free, online) book How to Design Programs. In DrRacket, set your language to “Beginning Student”: Language > Choose Language… > How to Design Programs > Beginning Student.
At least two test cases required for each (at least one non-trivial).
For inexact (floating-point) calculations,
(rectangle 80 20 'solid 'blue)
(circle 20 'solid 'red)
(ellipse 80 20 'outline 'orange)
(beside (rectangle 80 20 'outline 'blue)
(circle 20 'solid 'red))
(overlay (rectangle 80 20 'outline 'blue)
(circle 20 'solid 'red))
; Think of 'overlay' and 'beside' as being "addition for images"
; overlay with an offset:
(overlay/offset (rectangle 80 20 'outline 'blue)
0
10
(circle 20 'solid 'red))
; If you want to explore documentation:
; In DrRacket, position the caret on a function-name
; like 'overlay', and hit F1.
|
See also scheme-resources—ITEC380 Scheme resources.
home—lectures—exams—hws—breeze (snow day)
| ©2012, Ian Barland, Radford University Last modified 2012.Oct.15 (Mon) |
Please mail any suggestions (incl. typos, broken links) to ibarland |
![]() |