;; 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 lab3-5a) (read-case-sensitive #t) (teachpacks ((lib "world.ss" "teachpack" "htdp") (lib "testing.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "world.ss" "teachpack" "htdp") (lib "testing.ss" "teachpack" "htdp"))))) ;; lab3-5a.ss ;; An Ad is one of ;; -- Commercial ;; -- Service ;; A Commercial is (make-comm String Number Number) (define-struct comm (name minutes profit)) ;; A Service is (make-service String Number) (define-struct service (name minutes)) ;; Examples of data: (define ipod-comm (make-comm "ipod" 2 100)) (define ms-comm (make-comm "ms" 1 500)) (define xbox-comm (make-comm "xbox" 2 300)) (define heart (make-service "heart-assoc" 1)) (define youth (make-service "youth-prog" 2))