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

Q.2.1 Assume you have written a void method with the header string myTest num sc

ID: 3904507 • Letter: Q

Question

Q.2.1 Assume you have written a void method with the header string myTest num score, 1) string grade). Also assume you have declared a numeric variable named mark Write the correct method call. O The Independent institute of Education (Pty) Ltd 2013 Page 2 or Independent Inctitute of Eduaation Q.2.2 In a two-dimensional array declared as num myArray[61[71, the highest column 1) number is Q.2.3 What do you call two (2) arrays in which each element in one(1) array is associated 1) with the element in the same relative position in the other array? 0.2.4 What is a counter-controlled loop? Q.2.5 Change the folowing nested if statement to make use of a compound conditiona3 operator (AND/ OR) if x>0 then ?f y > 5 then output "Z" endif endif Q.2.6 List the two (2) most commonly used tools for planning a program's logic.

Explanation / Answer

Note; 4 sub-parts at a time please -- Policy of Chegg

2.1

int mark; // numeric variable

// void means it returns nothing

// 2 parameters: score and grade

void myTest(int score, string grade)

{

// body goes here

}

2.2

Highest column number is 6

myArray[6][7]

means 6 rows ranged from 0 to 5

7 columns ranged from 0 to 6

2.3

Parallel Arrays

Because there is a connection between both of the arrays

2.4

counter-controlled loop

using a variable to control the loop which has a starting number, get's incremented for each run and condition is checked every time.