Here is the Assignment. Using Windows Visual Studios 2012
To investigate the rst use of multiple C++ source code les for program implementation.
1. Your task is to adapt the threele example (DArea.h, DArea.cpp, TestArea.cpp) of
Lecture 09 to a three le solution (DWallVol.h, DWallVol.cpp, Prog06.cpp) which
computes the volume of the structural wall of a hollow, cylindrically shaped container
or tank (inner and outer boundaries are the surfaces of collinear cylinders). The data
input to your program should be as follows:
(a) The height (h) of the outer cylinder, in
(b) The diameter (d) of the outer cylinder, in
centimeters. In terms of the radius (r),
the diameter is twice the radius.
(c) The thickness (t) of the container wall (assumed to be uniform on all walls), in
2. You should note that the volume of a cylinder is the product of the height and the
cross sectional area of the circular end . . .
The structural wall volume of our hollow cylindrical container can then be computed
from the di
erence in cylindrical volumes associated with the exterior of the container
and the interior hollow.
= vcylinder ???? vhollow where vhollow = h(R ???? t)2
For a schematic of the dimensions of this tank, see the gure on the next page.
3. Your solution should include the following features:
(a) The height, diameter, and wall thickness should be real (double or oat) numbers,
with decimal parts allowed.
(b) The parameters should be restricted to nonnegative values (that is, your program
should refuse to utilize negative values input by the user).
(c) The wall thickness should be no larger than the minimum of one half of the
diameter or one half of the height, which ever is the most restrictive.
4. You must verify that the computations your routines complete are accurate. You should
test several cases and annotate your text output le to demonstrate the correctness of
your program computations. Might consider checking the results with a calculator.
(a) A text le,
Prog06.txt, which contains a psuedo-code `plan' for your program.
(b) A C++ header le,
The content of this le is shown on the next page of this procedure.
(c) A C++ source code le for the function denitions,
(d) A C++ source code le for providing an interactive \main" text application,
(e) A single text le,
Prog06.txt which contains demonstration dialog of your pro-
grams behavior. Demonstrate that the computations are accurate by annotating
this le with hand computations.
// Firstname Lastname
// COSC 1030 Spring 2013 Lab Section 1?
// Programming Assignment 06
// February 31, 2031
// Declarations (prototypes) for some
// simple volume functions.
// To ensure declarations aren't repeated.
double cylinderVolume(double h, double d);
double tankWallVolume(double h, double d, double t);
|Due By (Pacific Time)||10/03/2013 10:30 pm|
out of 1971 reviews
out of 766 reviews
out of 1164 reviews
out of 721 reviews
out of 1600 reviews
out of 770 reviews
out of 766 reviews
out of 680 reviews