#lang racket
(require gigls/unsafe)
(require rackunit)
(require rackunit/text-ui)

;;; File:
;;;   exam.rkt
;;; Authors:
;;;   The student currently referred to as 000000
;;;   Charlie Curtsinger
;;;   Samuel A. Rebelsky
;;; Contents:
;;;   Code and solutions for Exam 1 2016S
;;; Citations:
;;;

; +---------+--------------------------------------------------------
; | Grading |
; +---------+

; This section is for the grader's use.

; Problem 1: 
; Problem 2:
; Problem 3:
; Problem 4:
; Problem 5:
; Problem 6:
;           ----
;     Total:

;    Scaled:
;    Errors:
;     Times:
;          :
;          :
;          :
;           ----
;     Total:


; +-----------+------------------------------------------------------
; | Problem 1 |
; +-----------+

; Time Spent: 

; Citations:

; Solution:

; a.

; b.

; Parameters:

; Variables:

; Repetition:

; Conditionals:

; Sequencing:

; Subroutines:

; c.

; d.

; e.

; f.

; g.

; +-----------+------------------------------------------------------
; | Problem 2 |
; +-----------+

; Time Spent: 

; Citations:

; Solution:

;;; Procedure:
;;;   
;;; Parameters:
;;;   name, a type
;;;   name, a type
;;;   name, a type
;;; Purpose:
;;;   
;;; Produces:
;;;   name, a type
;;; Preconditions:
;;;   
;;; Postconditions:
;;;   
;;; Process:
;;;   
(define z (lambda 
(w x y) (- 
        (+ w y (* 2 x)) 
    (min w x y) x (max w x y))))

; Examples/Tests:


; +-----------+------------------------------------------------------
; | Problem 3 |
; +-----------+

; Time Spent: 

; Citations:

; Solution:

(define index-of-smallest
  (lambda (val1 val2 val3)
    0)) ; STUB

; Examples/Tests:


; +-----------+------------------------------------------------------
; | Problem 4 |
; +-----------+

; Time Spent: 

; Citations:

; Solution:

;;; Procedure:
;;;   irgb-bound
;;; Parameters:
;;;   color, an integer-encoded RGB color
;;; Purpose:
;;;   Bound the components of color.
;;; Produces:
;;;   bounded, an integer-encoded RGB color
;;; Preconditions:
;;;   [No additional]
;;; Postconditions:
;;;   If (irgb-red color) < 64, (irgb-red bounded) = 64.
;;;   If (irgb-red color) > 192, (irgb-red bounded) = 192.
;;;   If 64 <= (irgb-red color) <= 192, (irgb-red bounded) = (irgb-red color).
;;;   If (irgb-green color) < 64, (irgb-green bounded) = 64.
;;;   If (irgb-green color) > 192, (irgb-green bounded) = 192.
;;;   If 64 <= (irgb-green color) <= 192, (irgb-green bounded) = (irgb-green color).
;;;   If (irgb-blue color) < 64, (irgb-blue bounded) = 64.
;;;   If (irgb-blue color) > 192, (irgb-blue bounded) = 192.
;;;   If 64 <= (irgb-blue color) <= 192, (irgb-blue bounded) = (irgb-blue color)
(define irgb-bound
  (lambda (color)
    color)) ; STUB

; Examples/Tests:


; +-----------+------------------------------------------------------
; | Problem 5 |
; +-----------+

; Time Spent: 

; Citations:

; Solution:

(define color-palette
  (lambda (color)
    (color-swatch color))) ; STUB

; Examples/Tests:


; +-----------+------------------------------------------------------
; | Problem 6 |
; +-----------+

; Time Spent: 

; Citations:

; Solution:

;;; Procedure:
;;;
;;; Parameters:
;;;   name, a type
;;;   name, a type
;;;   name, a type
;;; Purpose:
;;;
;;; Produces:
;;;   name, a type
;;; Preconditions:
;;;
;;; Postconditions:
;;;
;;; Process:
;;;
(define t
(lambda (color
  string
  number)
        (irgb-add (irgb (* color (irgb-red string))
                  (* color (irgb-green string))
                  (* color (irgb-blue string)))
                  (irgb (* (- 1 color 
                        )(irgb-red number))
                  (* (- 1 
                  color) (irgb-green number))
                  (* (- 1
                  color) (irgb-blue number))))))

; Examples/Tests:


