#lang racket
(require csc151)
(require rackunit)
(require rackunit/text-ui)

;;; File:
;;;   exam1.rkt
;;; Authors:
;;;   The student currently referred to as 000000
;;;   Charlie Curtsinger
;;;   Fahmida Hamid
;;; Contents:
;;;   Code and solutions for Exam 1 2018F
;;; Citations:
;;;

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

; Time Log:
;   Date        Start   Finish  Elapsed Activity

; Time Spent: 

; Citations:

; Solution:

; a.

;;; Procedure:
;;;   round-to-multiple-of-three
;;; Parameters:
;;;   
;;; Purpose:
;;;   
;;; Produces:
;;;   
;;; Preconditions:
;;;   
;;; Postconditions:
;;;   

; b.
(define round-to-multiple-of-three-b
  (lambda (x) x)) ; STUB

; c.
(define round-to-multiple-of-three-c
  (lambda (x) x)) ; STUB

; Examples/Tests:
#|

|#

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

; Time Log:
;   Date        Start   Finish  Elapsed Activity

; Time Spent: 

; Citations:

; Provided Code:
(define round-to-multiple-of-three round-to-multiple-of-three-b)

; Solution:
(define test-round-to-multiple-of-three
  (test-suite
   "Tests of the round-to-multiple-of-three procedure"
   (test-case
    "Integer multiples of three"
    (check-= (round-to-multiple-of-three 3) 3)
    (check-= (round-to-multiple-of-three 6) 6)
    (check-= (round-to-multiple-of-three 9) 9)))) ; STUB

; Examples/Tests:
#|
> (run-tests test-round-to-multiple-of-three)

|#

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

; Time Log:
;   Date        Start   Finish  Elapsed Activity

; Time Spent: 

; Citations:

; Solution:

; a, b, d.

;;; Procedure:
;;;   
;;; Parameters:
;;;
;;; Purpose:
;;;   
;;; Produces:
;;;   
;;; Preconditions:
;;;   
;;; Postconditions:
;;;   
(define
  :/                                              (lambda (
  :)     (map (o (section list-ref : <>) (section - (length
  :)                                   <> 1)) (iota (length
  :)                                                   ))))

; c.

; Examples/Tests:

#|

|#

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

; Time Log:
;   Date        Start   Finish  Elapsed Activity

; Time Spent: 

; Citations:

; Solution:

;;; Procedure:
;;;   readable-list
;;; Parameters:
;;;
;;; Purpose:
;;;   
;;; Produces:
;;;   
;;; Preconditions:
;;;   
;;; Postconditions:
;;;   
(define readable-list
  (lambda (lst) 
    lst)) ; STUB

; Examples/Tests:
#|

|#

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

; Time Log:
;   Date        Start   Finish  Elapsed Activity

; Time Spent: 

; Citations:

; Solution:

;;; Procedure:
;;;   remove-odds
;;; Parameters:
;;;
;;; Purpose:
;;;   
;;; Produces:
;;;   
;;; Preconditions:
;;;   
;;; Postconditions:
;;;   
(define remove-odds
  (lambda (lst)
    lst)) ; STUB