Question: For each case do the following: a . Ask the user for the parameter ( s ) you need. e . g . for area

For each case do the following:
a. Ask the user for the parameter(s) you need. e.g. for area of square you only need the
side. Other areas and volumes you will need the variables to solve for area or volume
b. Call a function to solve for the area or a different function for the volume of the object
selected by the user. Note the call to a function will be in the form:
Variable = "name-of-function" (parameter list ); Parameter list is the items values in 3
above. The parameter values need to be the items necessary to calculate area or
volume respectively.
c. Use fprintf to output the answer e.g. Area or Volume of the specific object.
Each function will have1 output variable, and inputs based on the data needed to compute the
area of the cross-sectional shape i.e. circle, triangle, or parallelogram. In the volume functions
you need to add the height plus parameters for the area.
EXTRA CREDIT
10 pts for using listdialog for the six case selections. See Listdailog.m file in Canvas to see the code.
10 pts for using your area functions in the volume functions. For volume you need area times ht.
therefore if you ask for the correct input parameters, instead of recalculating the area just call the area
function then multiply the area times ht and return the volume. You will then call a function from a
function.
For each case do the following: a . Ask the user

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!