Define the containers
Steps
- Understand the problem.
- We need a container for radius,
area, PI, and radius_squared.
- radius,
area, and radius_squared must be variable
and of number type.
- PI
will not change. It will be a constant container.
- We need literal contains for "The area of a circle of radius ",
" is ", and "." to produce readable output.
- Design a solution.
- Create a variable container, radius, which
will hold number values.
- Create a variable container, radius_squared,
which will hold number values.
- Create a literal container which will hold the
value, "The
area of a circle of radius ".
- Create a literal container which will hold the
value, "
is ".
- Create a literal container which will hold the
value, " . ".
- Create a literal container which will hold the
value, 3.14.
- Create a constant container, PI, which will hold number values.
- Test the solution.