;; The first three lines of this file were inserted by DrScheme. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 19.1.1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor mixed-fraction #f #t none #f ())))
(require installed-teachpacks/picturing-programs)

; Worked exercise 19.1.1

; Assumes you've already done the "build-house" function, exercise 11.6.1.

; Additional test cases:
... ; your test cases here
(check-error (build-house 0 100 "blue")
             "build-house:  House width must be > 0.")
(check-error (build-house 100 0 "red")
             "build-house:   House height must be > 0.")

; Addition to definition:
(define (build-house width height color)
  ; ...
  (cond [(<= width 0)
         (error 'build-house "House width must be > 0.")]
        [(<= height 0)
         (error 'build-house "House height must be > 0.")]
        [else
         ... ; your code here
         ]
        ))
