7
answers
0
watching
202
views
4 Apr 2018

43. The bake method should create the number of cookies of the type and calorie as given and then add them to the cookie jar on which the method was called. Which of the below is the correct method body given that the input parameters are named type, number and calPerCookie? (A) for (int i = 0; i < number; i++) cookies.add(new Cookie ()); (B) for (int i = 0; i < number; i++) cookies.add(new Cookie (type, calperCookie)); (C) cookies.add(number * new Cookie (type, calperCookie); (D) Cookie c = new Cookie (type, calperCookie) cookies. add (number * c); (E) addCookies (type, number, calPerCookie);

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
Already have an account? Log in
Already have an account? Log in
Deanna Hettinger
Deanna HettingerLv2
5 Apr 2018
Already have an account? Log in

Related questions

Related Documents

Weekly leaderboard

Start filling in the gaps now
Log in