Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE DONT USE GLOBAL VARIABLES DONT USE BREAKS IN LOOP DONT USE MORE THAN ONE RETURN PER FUNCTION DONT PUT FUNCTIONS DEFINITIONS BEFORE MAIN! Thank

PLEASE DONT USE GLOBAL VARIABLES DONT USE BREAKS IN LOOP DONT USE MORE THAN ONE RETURN PER FUNCTION DONT PUT FUNCTIONS DEFINITIONS BEFORE MAIN!
Thank you!!! image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Goals: Developing problem-solving skills and functions Problem: You will create a program that will approximate the volume of a minor phase in a new composite material. While the material is being processed a second (minor) phase is formed that is modelled as bubbles and cylinders within the matrix of the primary phase. However, if too much of the second phase develops, the electrical conductivity of material is dramatically decreased and the material fails. You are to create a program that will determine what percentage of the material is due to cylinders (connected to the surface) and bubbles (totally enclosed within 1 2 the sample). For the purposes of this analysis all bubbles will be assumed to be the same size and all the cylinders wift be 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 cylinders, the radius of the cylinders and the height of the cylinders. Your program should include 6 functions in addition to your main function. .A value-returning 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." or

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions