problem set 3

problem set 3 - number is a number 4 A CD is a...

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

View Full Document Right Arrow Icon
6.3.1 1. make-movie, movie-title, movie-producer Movie (make-movie) 2. make-boyfriend, boyfriend-name, boyfriend-hair, boyfriend-eyes, boyfriend-phone Boyfriend (make-boyfriend) Name (boyfriend- name) Hair (boyfriend- hair) Eyes (boyfriend- eyes) Phone (boyfriend- phone) 3. make-cheerleader, cheerleader-name, cheerleader-number Cheerleader (make-cheerleader) 4. make-CD, CD-artist, CD-title, CD-price CD (make-CD) 5. make-sweater, sweater-material, sweater-size, sweater- producer Sweater (make-sweater) Sweater (sweater- material) Size (sweater-size) Producer (sweater- producer) Title (movie- title) Producer (movie-producer) Name (cheerleader- name) Number (cheerleader- number) Artist (CD-artist) Title (CD-title) Price (CD-price)
Background image of page 1

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

View Full DocumentRight Arrow Icon
6.4.1 1. A movie is a structure: (make-movie title producer) where title and producer are strings. 2. A boyfriend is a structure: (make-boyfriend name hair eyes phone) where name is a string, hair and eyes are symbols and phone is a number. 3. A cheerleader is a structure: (make-cheerleader name number) where name is a string and
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: number is a number 4. A CD is a structure: (make-CD artist title price) where artist and title are strings and price is a number. 5. A sweater is a structure: (make-sweater material size producer) where material and size are symbols and producer is a string. 6.5.1 1. (define (process-movie a-movie) …(movie-title a-movie)… …(movie-producer a-movie)…) 2. (define (process-boyfriend a-boyfriend) …(boyfriend-name a-boyfriend)… …(boyfriend-hair a-boyfriend)… …(boyfriend-eyes a-boyfriend)… …(boyfriend-number a-boyfriend)…) 3. (define (process-cheerleader a-cheerleader) …(cheerleader-name a-cheerleader)… …(cheerleader-number a-cheerleader)…) 4. (define (process-CD a-CD) …(CD-artist a-CD)… …(CD-title a-CD)… …(CD-price a-CD)…) 5. (define (process-sweater a-sweater) …(sweater-material a-sweater)… …(sweater-size a-sweater)… …(sweater-producer a-sweater)…)...
View Full Document

This note was uploaded on 03/26/2008 for the course CS 211 taught by Professor Matthias.f during the Fall '07 term at Northeastern.

Page1 / 3

problem set 3 - number is a number 4 A CD is a...

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

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