CS1120 PS #8: Chris Keshian and Harry Peppiatt

Preview:

DESCRIPTION

 

Citation preview

Domo Arigato CookieRoboto

By: Harry Peppiatt and Christopher Keshian

Our Robot

The DomoArigatoCookieRoboto is equipped with:

- One right-hand scissors (open=0,close=1)- One left-hand spatula (drop-in-oven=0,lift=1)- One stomach-oven pre-set to 375 degrees

Fahrenheit (oven-on=0,oven-off=1)

Our Program

Step 1:(define (open-package package)

(if (= package sugar-cookies)cutself-destruct))

(define (cut package)(if (= sugar-cookies fresh)

10))

(define (self-destruct robot)(if (= robot dumb)

explodestay-alive))

Our Program Continued…

Step 2:(define (prepare package)

(if (= package open)lift-cookiesself-destruct))

(define (lift-cookies sugar-cookies)(if (= sugar-cookies festive)

10))

Our Program Continued…

Step 3:(define (load-oven sugar-cookies)

(if (= sugar-cookies lifted)0self-destruct))

Our Program Continued…

Step 4:(define (bake sugar-cookies)

(if (= oven loaded)01))

Our Program Continued…

Step 5:(define (cookies-done? sugar-cookies)

(if (= sugar-cookies brown)liftself-destruct))

Our Program Continued…

Step 6:(define (enjoy sugar-cookies)

(if (= sugar-cookies delicious)EATkill-robot))

(define (kill-robot robot)(if (= robot non-compliantunplugstill-unplug))

Statement

While employing some of the concepts and logic learned this semester, this comprehensive cookie-baking robot is still far from complete. Due to the limitations of circuit usage, our tools (oven, spatula, scissors) turn on and off simultaneously, which complicates the cookie baking robot. Although recently placed on the market, the DomoArigatoCookieRoboto has been recalled due to its tendency to spontaneously self-destruct. Whether this tendency was due to a programming error, or the fault of the consumer, DomoArigotoCookieRoboto is currently being tested and will return to households near you this Christmas season.

Recommended