;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname l11-interface) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #t))) ;; Lab 11 Interface | CS 115 | 1199 ;; =l11q1= (define-struct game (winner loser high low)) ;; A Game is a (make-game Str Str Nat Nat) ;; requires: ;; * high (the winner's score) > low (the loser's score) (define (fixed-game a-game) ...) ;; =l11q2= (define-struct card (rank suit)) ;; A Card is a (make-card Nat (anyof 'spades 'hearts 'diamonds 'clubs)) ;; requires: ;; * rank is in the range 1 to 13 (define (big-card-small-suit card1 card2) ...) ;; =l11q3= (define-struct card (rank suit)) ;; A Card is a (make-card Nat (anyof 'spades 'hearts 'diamonds 'clubs)) ;; requires: ;; * rank is in the range 1 to 13 (define (card-value a-card) ...) ;; =l11q4= (define-struct game (winner loser high low)) ;; A Game is a (make-game Str Str Nat Nat) ;; requires: ;; * high (the winner's score) > low (the loser's score) (define (games-won results name) ...) (define (high-score results name) ...) ;; =l11q5= (define-struct clock (hours mins)) ;; A Clock is a (make-clock Nat Nat) ;; requires: ;; * hours is in the range 0 to 23 ;; * mins is in the range 0 to 59 (define-struct meeting (start end)) ;; A Meeting is a (make-meeting Clock Clock) ;; where: ;; * start is a Clock representing the starting time of the meeting ;; * end is a Clock representing the ending time of the meeting ;; requires: ;; * if end is equal to or earlier in the day than start, then end is exactly one day after start (define (time-elapsed start-time end-time) ...) (define (total-meeting-time meetings) ...)