Button [Display layout]
The program must display the layout of the mall - NSC Information Technology - Question 3 - 2017 - Paper 1
Question 3
Button [Display layout]
The program must display the layout of the mall. Write code to use the data supplied in the two-dimensional array to display the layout in ne... show full transcript
Worked Solution & Example Answer:Button [Display layout]
The program must display the layout of the mall - NSC Information Technology - Question 3 - 2017 - Paper 1
Step 1
Outer loop for rows
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Initialize an outer loop that iterates through each row of the arrMall array. This loop will control the display of each row in the mall layout.
Step 2
Inner loop for columns
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Within the outer loop, set up an inner loop that iterates through each column of the current row to access all elements in the row.
Step 3
Display symbol from two-dimensional array
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Inside the inner loop, print or store the current element of the arrMall array, which corresponds to the restaurant layout, ensuring proper formatting.
Step 4
In row and column
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Ensure that the layout is displayed in a way that each restaurant code is aligned correctly with its respective row and column.