Anúncio

CS1120 PS #8: Chris Keshian and Harry Peppiatt

5 de Dec de 2011
Anúncio

Mais conteúdo relacionado

Destaque(20)

Anúncio

CS1120 PS #8: Chris Keshian and Harry Peppiatt

  1. Domo Arigato CookieRoboto By: Harry Peppiatt and Christopher Keshian
  2. 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)
  3. Our Program Step 1: (define (open-package package) (if (= package sugar-cookies) cut self-destruct)) (define (cut package) (if (= sugar-cookies fresh) 1 0)) (define (self-destruct robot) (if (= robot dumb) explode stay-alive))
  4. Our Program Continued… Step 2: (define (prepare package) (if (= package open) lift-cookies self-destruct)) (define (lift-cookies sugar-cookies) (if (= sugar-cookies festive) 1 0))
  5. Our Program Continued… Step 3: (define (load-oven sugar-cookies) (if (= sugar-cookies lifted) 0 self-destruct))
  6. Our Program Continued… Step 4: (define (bake sugar-cookies) (if (= oven loaded) 0 1))
  7. Our Program Continued… Step 5: (define (cookies-done? sugar-cookies) (if (= sugar-cookies brown) lift self-destruct))
  8. Our Program Continued… Step 6: (define (enjoy sugar-cookies) (if (= sugar-cookies delicious) EAT kill-robot)) (define (kill-robot robot) (if (= robot non-compliant unplug still-unplug))
  9. 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.
Anúncio