5
answers
0
watching
254
views
15 Apr 2018
41. The eat method should go through the cookie jar, find the first cookie of the type given as input and take it out of the jar. It should then return the number of calories of that cookie, or 0 if no cookie of that type is in the jar. What is the correct line of code to be added at line 31? (A) Nothing is missing (B) for (int i = 0; i < cookies.size(); i++) (C) while (cookies.size() > 0) (D) for (int i = 1; i <= cookies.size(); i++) (E) if (cookies.getType (type))
41. The eat method should go through the cookie jar, find the first cookie of the type given as input and take it out of the jar. It should then return the number of calories of that cookie, or 0 if no cookie of that type is in the jar. What is the correct line of code to be added at line 31? (A) Nothing is missing (B) for (int i = 0; i < cookies.size(); i++) (C) while (cookies.size() > 0) (D) for (int i = 1; i <= cookies.size(); i++) (E) if (cookies.getType (type))
28 Jun 2023
rosi10agarwalLv10
29 Mar 2023
Already have an account? Log in
gloryolalere280Lv10
20 Nov 2022
Already have an account? Log in
Lelia LubowitzLv2
16 Apr 2018
Already have an account? Log in