Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a NOTEPAD or PDF file that restates the problem in your own words, specif

ID: 3871604 • Letter: C

Question

Create a NOTEPAD or PDF file that restates the problem in your own words, specifies what input is needed from whomever is using the process, what output is expected, the step by step process (algorithm) to get the output from the input, and test data (input for which you know the expected output for each of the 3 problems given below. You should not write any actual C++ code.  

Problem 2: Suppose you have a cubic (all sides are equal) box. Create a process to determine the dimensions of a tetragonal box (the length is equal to the width, but the height is different) that would have the same volume as the cubic box if the height of the tetragonal box is 1.2 times the edge of the cubic box.


Explanation / Answer

Solution============

#Problem: Given the side length of a cube, find the height and side length of a Tetragon having the same volume as that of the Cube. Here, height of tetragon will be 1.2 times to that of the cube.

#Input required: side length of the cube
#Expected output: Length of Tetragonal Side and Height

#Algorithm
function getTetragonalSide(cubeSide):

   calculate cube_volume=cubeSide*cubeSide*cubeSide
   calculate tetra_height=cubeSide*1.2
   calculate tetra_side = sqrt(cube_volume/tetra_height)
  
return tetra_side,tetra_height


#Test Data:

#Input #Output(Side Height)
10.0      9.13   12.00
17.0      15.51 20.40
24.0      21.90 28.80
31.0      28.30 37.20
38.0      34.68 45.60