1. List of Numbers
You can use the data definition of List of Numbers from our lecture to answer the following questions
2. List of Letter Grades
Recall our definition of a letter grade (one of 'A
, 'A-
etc.).
3. Disks and Scenes
You are working with a team that is building a new game. The game is displayed in a window that has a height and a width. As part of the game there are disks (displayed as circles) that we must display in our window. Here is an incomplete attempt to design part of the game that you inherited.
(define-struct disk (radius center color))
;; A Disk is a (make-disk NonNegInteger Posn String)
;; INTERP: represents a disk with a radius, the center of the disk as a
;; coordinate and the disk's color name
(define-struct window (width height))
;; A Window is a (make-window NonNegInteger NonNegInteger)
;; INTERP: represents the size of our window with its width and height