Please send questions to st10@humboldt.edu .
**********************
EXECUTE FUNCTIONS - DONE
**********************
last modified: 12-12-11

The user should be able to write expressions that call the functions
they have written.

STATUS: DONE
FIRST PASSED: 12-08-11
acceptance tests last attempted: 12-12-11
acceptance tests last passed:    12-12-11  

-------------------
acceptance test 1
-------------------
try to write an expression using a function a user previously created

1. make sure that a directory:
   /Users/smtuttle/480xp-tests/dir-test2
   ...exists, and has circ_area.h, circ_area.cpp, and circ_area.o in it.
      (and NOT ring_area...)

(if necessary, exit the Gui.pyw via the Python menu)

2. run:
   python3 theGUI.pyw

(if necessary:
   *   Click "Change directory" and navigate to the following
       directory:
       /Users/smtuttle/480xp-tests/dir-test2
       ...and click "Choose".
)

3. select circ_area from the right-hand area.

4. enter 
circ_area(10)
   ...into expression textfield

5. click Execute button

6. see if 314.159 appears in result text area.

LAST TESTED: 12-12-11
LAST PASSED: 12-12-11

-------------------
acceptance test 2
-------------------
try to write an expression using a function a user previously created
that uses another function a user previously created (and indicating
that both are needed for the expression)

1. make sure that a directory:
   /Users/smtuttle/480xp-tests/dir-test2/
   ...exists, and has circ_area.h, circ_area.cpp, and circ_area.o in it
      (and not ring_area!)

(if necessary:
2. run:
   python3 theGUI.pyw

   *   Click "Change directory" and navigate to the following
       directory:
       /Users/smtuttle/480xp-tests/dir-test2
       ...and click "Choose".
)

3. Click "New", and create function ring_area:

click circ_area checkbox on the right -- ring_area uses circ_area

ring_area

ring_area: double double -> double

expects the outer radius and inner radius of a ring,
and produces the area of that ring

double ring_area(double outer_rad, double inner_rad)

ring_area(10, 1) == 311.01741
ring_area(10, 5) == 235.61925

{
    return circ_area(outer_rad) - circ_area(inner_rad);
}

   *   click "Compile, Test, and Save" -- make sure it compiles
       and the tests pass

4. move the windows so that you can reach the Helper++ window, and
   click the checkboxes for circ_area and ring_area in the right-hand area.

5. enter 
circ_area(10)
   ...into expression textfield

   *   click Execute button

   *   see if 314.159 appears in result text area.

5. enter 
ring_area(10, 1)
   ...into expression textfield

   *   click Execute button

   *   see if (approximately) 311.01741 appears in result text area.

6. enter 
ring_area(10, 1) + circ_area(10)
   ...into expression textfield

   *   click Execute button

   *   see if (approximately) 625.17641 appears in result text area.

LAST TESTED: 12-12-11
LAST PASSED: 12-12-11 

-------------------
acceptance test 3
-------------------
try to write an expression using a function a user previously created
that uses another function a user previously created (but fail to note
what it uses, so expression SHOULD fail)

1. make sure that a directory:
   /Users/smtuttle/480xp-tests/dir-test2/
   ...exists, and has circ_area.h, circ_area.cpp, and circ_area.o in it
   and also has ring_area.h, ring_area.cpp, and ring_area.o in it.

(if necessary:
2. run:
   python3 theGUI.pyw

   *   Click "Change directory" and navigate to the following
       directory:
       /Users/smtuttle/480xp-tests/dir-test2
       ...and click "Choose".
)

3. select JUST ring_area from the right-hand area.

4. enter 
ring_area(10, 1)
   ...into expression textfield

   *   click Execute button

   *   see if fails (it should, because circ_area is needed
       for example's main to link)

LAST TESTED: 12-12-11
LAST PASSED: 12-12-11

-------------------
acceptance test 4
-------------------
try to write an expression using a function a user previously created
but without indicating it on the right (so it SHOULD fail)

1. make sure that a directory:
   /Users/smtuttle/480xp-tests/dir-test2/
   ...exists, and has circ_area.h, circ_area.cpp, and circ_area.o in it
   and also has ring_area.h, ring_area.cpp, and ring_area.o in it.

(if necessary:
2. run:
   python3 theGUI.pyw

   *   Click "Change directory" and navigate to the following
       directory:
       /Users/smtuttle/480xp-tests/dir-test2
       ...and click "Choose".
)

3. don't select ANY function on the right

4. enter 
circ_area(10)
   ...into expression textfield

5. click Execute button

6. Verify that it fails (shouldn't successfully compile without
   #include generated from the checkbox)

LAST TESTED: 12-12-11
LAST PASSED: 12-12-11