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))

For unlimited access to Homework Help, a Homework+ subscription is required.

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in
Lelia Lubowitz
Lelia LubowitzLv2
16 Apr 2018
Already have an account? Log in

Related questions

Related Documents

Weekly leaderboard

Start filling in the gaps now
Log in