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

FS F6 F7 F8 4 ?? PART VI CODE SEGMENTS Record your answers in this booklet and s

ID: 3918058 • Letter: F

Question

FS F6 F7 F8 4 ?? PART VI CODE SEGMENTS Record your answers in this booklet and show your work. Remember to declare any additional variables needed for your solution. Answer any three of the following five questions in this section Each question is worth 10 points. Ene are an array of integers named intArray that will hold 10 elements. Then using a for loop, assign the array the values 1 - 10, respectively. 47. Decl Write a method which returns the area of a trapezoid when passed the value of the two bases and the height. The formula for the area of a trapezoid is 48. Use the following method declaration: double AreaOfTrapazoid (int b1, int b2, int height)

Explanation / Answer

Ans:1

int intArray[10];

for(int i = 0; i<10; i++)

{

intArray[i] = i+1;

}

=======================================================

Ans:48

double AreaOfTrapazoid(int b1, int b2, int height)

{

double Area = (height *(b1 + b2))/2;

return Area;

}

========================================================

Kindly Check and Verify Thanks..!!!