CS 10, Fall 2008
Assignment 3
Part 2 Runs


First run - user makes no mistakes:

(User input is blue.)

Accepting these commands:
  NEW
  SET
  BRIGHTEN
  DARKEN
  SETarea
  BRIGHTENarea
  DARKENarea
  DISPLAY
  QUIT
display 
new 5 5
display 
new 10 10 175 175 0
display 
set 4 4 255 0 0
brighten 4 5
darken 5 4
setarea 1 1 2 8 100 100 255
brightenarea 7 2 7 7
darkenarea 8 2 8 7
display 
new
display 
quit
>


Second run - user makes many, many mistakes:

(User input is mostly between the error messages.)

Accepting these commands:
  NEW
  SET
  BRIGHTEN
  DARKEN
  SETarea
  BRIGHTENarea
  DARKENarea
  DISPLAY
  QUIT
new grid
ERROR: bad new row size: "grid"
new 20
ERROR: missing new column size
new 20 cat
ERROR: bad new column size: "cat"
new 1 10
ERROR: new row size out of range: "1"
new 2 1
ERROR: new column size out of range: "1"
new 401 2
ERROR: new row size out of range: "401"
new 2 401
ERROR: new column size out of range: "401"
new 20 10 RED
ERROR: bad red value: "RED"
new 20 10 100 green
ERROR: bad green value: "green"
new 20 10 100 0 25.5
ERROR: bad blue value: "25.5"
set red
ERROR: bad row to set: "red"
set 2 red
ERROR: bad column to set: "red"
new 3 5
display 
set -1 2
ERROR: row to set out of range: "-1"
set 3 2
ERROR: row to set out of range: "3"
set 2 -1
ERROR: column to set out of range: "-1"
set 2 5
ERROR: column to set out of range: "5"
set 2 2
ERROR: missing red value
set 2 2 255 0 0
brighten
ERROR: missing row to brighten
brighten 2
ERROR: missing column to brighten
brighten cat
ERROR: bad row to brighten: "cat"
brighten 2 1.5
ERROR: bad column to brighten: "1.5"
brighten 3 2
ERROR: row to brighten out of range: "3"
brighten 2 5
ERROR: column to brighten out of range: "5"
darken 2
ERROR: missing column to darken
darken cat 1
ERROR: bad row to darken: "cat"
darken 1 2.5
ERROR: bad column to darken: "2.5"
darken -1 2
ERROR: row to darken out of range: "-1"
darken 2 -1
ERROR: column to darken out of range: "-1"
setarea cat 2 2 2 255 0 0
ERROR: bad first row to set: "cat"
setarea 2 5 2 5 255 0 0
ERROR: first column to set out of range: "5"
setarea 2 2 1 5 255 0 0
ERROR: second row to set out of range: "1"
setarea 2 4 2 3 255 0 0
ERROR: second column to set out of range: "3"
setarea 2 2 3 3
ERROR: second row to set out of range: "3"
setarea 2 2 2 3
ERROR: missing red value
brightenarea 0 2 1
ERROR: missing second column to brighten
brightenarea 0 2 1 6
ERROR: second column to brighten out of range: "6"
brightenarea 2 2 1 3
ERROR: second row to brighten out of range: "1"
darkenarea
ERROR: missing first row to darken
darkenarea 1
ERROR: missing first column to darken
darkenarea 1 1
ERROR: missing second row to darken
darkenarea 1 1 1
ERROR: missing second column to darken
darkenarea 1 1 1 5
ERROR: second column to darken out of range: "5"
darkenarea 1 1 1 0
ERROR: second column to darken out of range: "0"
darkenarea 1 1 1 4
display 
quit
>