Click to reopen instructions.

This is FRQ Question 4 from the 2023 exam. For the full instructions you will need to look at the PDF starting on page 14.

Questions of

“(a) Write the moveCandyToFirstRow method, which attempts to ensure that the box element at row 0 and column col contains a piece of candy, using the following steps.” (See the rest of the instructions for this part in the PDF starting on page 15.)

“(b) Write the removeNextByFlavor method, which attempts to remove and return one piece of candy from the box.” (See the rest of the instructions for this part in the PDF starting on page 17.)