Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with a c++ program using simple code and no more than #include , #include , and #include using namespace std; and must follow

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Need help with a c++ program using simple code and no more than #include , #include , and #include using namespace std; and must follow the guidelines provided. Also must be made in visual studio

Goals: Developing problem-solving skills and functions Problem: You will create a program that will approximate the volume of pores in a new composite material. While the material is being formed it is injected with air which creates bubble and pores to decrease the density of the composite material. However, if too many pores and bubbles are created, the material loses its strength and catastrophic failure occurs. You are to create a program that will determine what percentage ofthe material is due to pores (connected to the surface)and bubbles (totally enclosed within the sample). For the purposes of this analysis all bubbles will be assumed to be the same size and all the pores will be cylinders of the same size. The sample that is being analyzed is a rectangular parallelepiped (all angles are 90 degrees, but length, width, and height may be different values). The user will be prompted to enter the dimensions of the sample (height, length, and width), the number of the bubbles, the radius of the bubbles, the number of cylindrical pores, the radius of the cylindrical pores and the height of the cylindrical pores. Your program should include 6 functions in addition to your main function. Avoid function that will robustly confirm that the dimension entered is greater than zero. This function should accept two parameters: the dimension and what the dimension corresponds to e.g. "the height of the sample","the radius of spherical bubble", etc.(see examples below) This function should contain a single loop and no selection structures. If the dimension is incorrect, the user should be told what dimension is incorrect and prompt the user to re-enter the value for the dimension. For example, the message may be something like "The height of the sample must be greater than zero. Please re-enter the height of the sample." "The radius of the bubbles must be greater than zero. Please re-enter the radius of the bubbles." The check should be robust (ie. the user will be given the error message and prompted to re-enter the incorrect value as long as it is invalid function that will robustly confirm that the value entered for the number of spherical bubbles or cylindrical pores is greater than or equal zero. This

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions