1. Images
This lab will use DrRacket’s image library.
In order to create and manipulate images in DrRacket we need to make the image library available to our code. Add the following line to your definitions window
(require 2htdp/image)
The image library allows us to create all sorts of shapes. Have a look at the library’s documentation for more details.
2. Design Recipe
2.1. Creating Images (again) this time using the Design Recipe
3. Itemizations
We are trying to develop a program to keep track of all equipment for a store that buys and sells computer accessories.
A popular category of accessories in the store is media (CDs, DVDs, etc.), and gaming peripherals (keyboards, mice, etc.).
Here are two data definitions for media and peripherals
;; A Media is one of
;; - 'dvd
;; - 'cd
;; - 'blueray
;; - 'floppy
;; INTERP: represents each kind of media kept at the store
;; A Peripheral is one of
;; - "keyboard"
;; - "mouse"
;; - "driving wheel"
;; - "headset"
;; - "controller"
;; INTERP: represents each kind of peripheral kept at the store