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

what the output , input and processing tasks ? A program calculates the surface

ID: 2078529 • Letter: W

Question

what the output, input and processing tasks ?

A program calculates the surface area and internal volume of a torus. A torus is a 3- dimensional surface created by revolving a circle through its center around an axis coplanar with the circle. An example of a torus is depicted in Figure 1. The formulae to calculate the volume and area of a ring or horn torus are^2: A= =(2 pi r)(2 pi R) = 4 pi^2 Rr V =(pi r^2)(2 pi R) =2 pi^2 Rr^2 Where: A Surface area of the torus (in squared units of length) V: Internal volume of the torus (in cubic units of length) R: Major radius. Represents the distance from the center of the tube to the center of the torus (in units of length) r: Minor radius. Represents the radius of the tube (in units of length) pi: Mathematical constant approximately equal to 3.1416 The program must also determine the type of torus based on the relationship between the two radii (see Table 1 and Figure 2). Finally, the program must display the message "Calculated area and volume may be overstated" if the type of torus is "Spindle". Table 1. Types of tori based relationship between R and r

Explanation / Answer

For the given problem
the program has three main tasks
1. input task
2. Processing task
3. output task

1. Input task involves asking the user of R and r values, taking input from the user and storing it under a variable
2. Processing task:
a. Find A using 4*pi*pi*R*r
b. Find V using 2*pi*pi*R*r*r
c. Find if r < R, r = R or r > R and rename the ToroidType variable ( which is a string ) to the corresponding category

3. Output Task
a. Output the Value of A and V to the display
b. Output the value of the variable ToroidType to the dfisplay