Homework

    Your name:

    Your email address:


    1. Add a line to main() of the Area Of Circle program to print out the result of square(radius). What happened when you ran it?

      Answer:

    2. Add new routines to the circle class that will compute the circumference of a circle. Add a line to main () that will print out the circumference in addition to the radius.

      Answer:

    3. Add a new class called Square and methods for computing the area and perimeter. (Then, if you wish, add other geometric figures and formulas.

      Answer:

    4. ( Advanced ) Consider the following stack.h program to define a stack, the file stack.ops which accesses the stack, and stack.test which tests the stack. Write a program to reverse a list of numbers.

      Answer:

    5. Using 2 stacks, write code to evaluate "23+4*" and "234+*".

      Answer: