Purchase Solution

Compute the volume of a box, cylinder, and sphere

Not what you're looking for?

Ask Custom Question

The selection of which calculation to make should be made from a ComboBox Control. The application should include four input fields that allows a user to enter numbers with two decimal places; each input field also should indicate that the input value is measured in feet. Label the four input fields as: Length, Width, Height, and Radius. When the user clicks a button to perform the calculation, the button's event procedure should first determine that a selection for the calculation type was made. Next, the event procedure should ensure that non-zero, positive values have been entered only for the measurements needed for the particular formula being used. Finally, the calculation should be performed and a message box displayed to indicate the inputs and output in the following format:

The volume of a box with a length of 1.00 feet, a width of 2.00 feet, and a height of 3.00 feet has a volume of 6.00 cubic feet.

Use the following formulas to determine the volumes of various shapes:

1. Volume of a box: V = L x W x H where L is the Length, W is the width, and H is the height of the box
2. Volume of a cylinder: V = pi x R x R x H, where R is the radius, and H is the height of the cylinder
3. Volume of a cone: V = (pi x R x R H)/3, where R is the radius of the base, and H is the height of the cone
4. Volume of a sphere: V = 4 x pi x R * R x R/3, where R is the radius of the sphere

In all of the above formulas, use the .NET framework class linrary constant, Math.PI, for the calue of pi.

Purchase this Solution

Purchase this Solution


Free BrainMass Quizzes
Basic Networking Questions

This quiz consists of some basic networking questions.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Javscript Basics

Quiz on basics of javascript programming language.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.