Project #13914 - VOLUME OF THE WALL OF A CYLINDER

Here is the Assignment. Using Windows Visual Studios 2012

 

 

1 Purpose

To investigate the rst use of multiple C++ source code les for program implementation.

2 Procedure

1. Your task is to adapt the three le 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

centimeters.

(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

centimeters

.

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 . . .

vcylinder

= hR2

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.

vwall

= 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,

DWallVol.h

 

The content of this le is shown on the next page of this procedure.

 

(c) A C++ source code le for the function de nitions,

DWallVol.cpp

 

(d) A C++ source code le for providing an interactive \main" text application,

Prog06.cpp

(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.

 

// DWallVol.h

 

// 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.

 

#ifndef DWALLVOL_H

 

#define DWALLVOL_H

 

double cylinderVolume(double h, double d);

 

double tankWallVolume(double h, double d, double t);

 

#endif

Subject Computer
Due By (Pacific Time) 10/03/2013 10:30 pm
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy