;; Name : John Doe ;; GT Number : gti999z ;; HW : HW2 ;; Course : cs1321 ;; Instructor : Lerner ;; Lecture Time : 6:00 pm ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; <1> ;; Data Analysis & Definitions: (define PI 3.14) ;; Contract: area-of-disk : number -> number ;; Purpose: to compute the area of a disk with a ;; given radius ;; Examples: ;; (area-of-disk 3) should produce 28.26 ;; (area-of-disk 1) should produce 3.14 ;; Template: ;; ;; ;; Definition: (define (area-of-disk radius) (* PI (* radius radius))) ;; Tests: (area-of-disk 1) ;; expected value 3.14 (area-of-disk 3) ;; expected value 28.26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; <2> ;; Data Analysis & Definitions: ;; ;; Contract: area-of-ring : number number -> number ;; Purpose: to compute the area of a ring whose radius ;; is outer and whose whole has a radius of inner. ;; Examples: ;; (area-of-ring 5 3) should produce 50.24 ;; (area-or-ring 7 6) should produce 40.82 ;; Template: ;; ;; ;; Definition: (define (area-of-ring outer inner) (- (area-of-disk outer) (area-of-disk inner))) ;; Tests: (area-of-ring 5 3) ;; expected value 50.24 (area-of-ring 7 6) ;; expected value 40.82