9
Domo Arigato CookieRoboto By: Harry Peppiatt and Christopher Keshian

CS1120 PS #8: Chris Keshian and Harry Peppiatt

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: CS1120 PS #8: Chris Keshian and Harry Peppiatt

Domo Arigato CookieRoboto

By: Harry Peppiatt and Christopher Keshian

Page 2: CS1120 PS #8: Chris Keshian and Harry Peppiatt

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)

Page 3: CS1120 PS #8: Chris Keshian and Harry Peppiatt

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))

Page 4: CS1120 PS #8: Chris Keshian and Harry Peppiatt

Our Program Continued…

Step 2:(define (prepare package)

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

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

10))

Page 5: CS1120 PS #8: Chris Keshian and Harry Peppiatt

Our Program Continued…

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

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

Page 6: CS1120 PS #8: Chris Keshian and Harry Peppiatt

Our Program Continued…

Step 4:(define (bake sugar-cookies)

(if (= oven loaded)01))

Page 7: CS1120 PS #8: Chris Keshian and Harry Peppiatt

Our Program Continued…

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

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

Page 8: CS1120 PS #8: Chris Keshian and Harry Peppiatt

Our Program Continued…

Step 6:(define (enjoy sugar-cookies)

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

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

Page 9: CS1120 PS #8: Chris Keshian and Harry Peppiatt

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.