CIS 264 C++ Programming for Engineers

Program Requirements: Circle Calculations

Design and code a C++ program that calculates and prints the (D)iameter, the (C)ircumference, or the (A)rea of a circle, given the radius. The program inputs two data items: the calculation needed, and the radius of the particular circle. The program should continue to ask the user for values until the user enters 'Q' as the type of calculation.

The program should echo print the input data and prompt appropriately. Label the output and format to two decimal places.  

Example:

     Enter the calculation type (A, C, D, Q) and radius:

A 6.75

     The area of a circle with radius 6.75 is 143.14

     Enter the calculation type (A, C, D, Q) and radius:

D 4.50

     The diameter of a circle with radius 4.50 is 9.00

Enter the calculation type (A, C, D, Q) and radius:  

Q

     Thank You

Use functional decomposition to create a code design. Each math operations must be in its own value returning function.  No GLOBAL Variables are allowed!

 Following the guidelines discussed in class, construct a test set for the program.

Final Program Includes:

Problem Description
Algorithm
Functional Decomposition (showing structure and function headers)
Test Set Design
Source Code
Sample Output