a5q4 - ; The first three lines of this file were inserted...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
;; 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-advanced-reader.ss" "lang")((modname a5q4) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f ()))) ;; a5q4 ;;Assignment 5 Question 4 ;; Ru Wang r46wang 20319247 ; (define-struct movie-info (title genre rating)) ;; state variables: ;; holds the initial value for the number of drama movies (define numDrama 0) ;; holds the initial value of total ratings of all dramas (define totDrama 0) ;; holds the inital value of the number of non-dramas (define numOther 0) ;; holds the inital value of the ratings of all non-dramas (define totOther 0) ;;pre-defined movie-infos for easier testing: (define d1 (make-movie-info "a" 'drama 10)) (define d2 (make-movie-info "b" 'drama 8)) (define d3 (make-movie-info "c" 'drama 6)) (define d4 (make-movie-info "d" 'drama 4))
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/21/2010 for the course CS 116 taught by Professor T.vasiga during the Fall '09 term at Waterloo.

Page1 / 2

a5q4 - ; The first three lines of this file were inserted...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online