Homework
Your name:
Your email address:
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:
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:
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:
(
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:
Using 2 stacks, write code to evaluate "23+4*" and "234+*".
Answer: