Programming project #1
DATE ASSIGNED: September 12, 2000
DUE DATE: September 19, 2000, at 9:30 a.m. (in class)
Objectives
1. Practice designing a program.
2. Practice implementing a program design in C++.
3. Practice testing a program.
4. To get familiar with the programming environment.
Introduction
Your assignment is given below. To solve it, write a program that reads the necessary information to compute and output the indicated values, as efficiently as possible. Following the pattern in the class example, first, design your program by specifying its behavior, identifying the objects and operations it needs to solve the problem, and then organizing the objects and operations into an algorithm. Then code your design in C++ using stepwise translation. Finally, test your program thoroughly.
In the descriptions below, we use the notation x^y to denote x raised to the power of y, even though C++ does not have an exponentiation operator.
Project
1. Your program should compute the side surface area and volume of a cylinder. The formulas are:
sideSurfaceArea = 2 * pi * radius * height.
volume = pi * radius^2 * height.
2. INPUT: Your program should input the cylinder's height and radius
3. OUTPUT: Output its surface area and volume information descriptively.
4. Name your source file 'hmwk1.cc' and store it in your Panther directory.
5. Be sure to include the following information as comments in the
header of your source file:
/*
Author: John Doe
Description:
Input:
Output:
*/
6. As you are aware certain types of assistance are inappropriate in
this
class. Read the collaboration policy given to you at the beginning
of
the semester, if you have any questions.
7. Follow program standards as presented in class and in your book.
Pay special attention to comments, identifier style, and consistent
4-space indentation.
8. Turn In Hard Copies of:
A) your design (behavior, objects, operations, algorithm);
B) your source code; and
C) the output from three different executions in which
you test the correctness of your program (using a script).
9. Submit your program to the T.A. :
When you are finally done with your program, and are ready to submit it,
do the following steps.