Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi, need help programing this in C++ while following all the parameters/ functions we are told to use. We cannot use global variables, cannot use

image text in transcribed

image text in transcribed

image text in transcribed

Hi, need help programing this in C++ while following all the parameters/ functions we are told to use. We cannot use global variables, cannot use break statements or return statements in definitions before main. We also need comments for each function other than main that states the purpose of the function, input the function ( both input from the funcrion call and interqctive input), output from the function ( both information sent back to the function call and interactive output), processing in the function. They should be placed immediately before the function definition.

We can only use material consisting of loops and files, functions, and descions. No arrays.

The simpler this is written the better Will give a good rating, thank you so much

Goals: Developing problem-solving skills and functions Problem: You will create a program that will approximate the volume of pores in 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 of the 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 A void function that will robustly confim that the dimension entered is greater than zero This function should accept two parameters: the dimension and what the dimension corresponds to eg "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 of The radius of the bubbles must be greater than zero Please re-enter the radius of the bubbles. The check should be robust (i.e. the user will be given the error message and prompted to re-enter the incorrect value as long as it is invalid. (You may find the demo progranm from 10/10/18 useful). A valid value should be sent back to main

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

More Books

Students also viewed these Databases questions