id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > foodNetFeelings
prev  |  next  |  chance

Write a method that returns the phrases as seen in the test data based on the values of 'like' and 'love'. If you do not like or love a food then you avoid it. If 'love' is true then you love the food no matter what value 'like' has. If you 'like' a food but do not 'love' it then you say that you like it. Remember to look at the test data for clarity.


foodNetFeelings("hot dogs", true, true) → "I love hot dogs"
foodNetFeelings("chicken", true, false) → "I like chicken"
foodNetFeelings("liver", false, false) → "I avoid liver"

...Save, Compile, Run (ctrl-enter)

public String foodNetFeelings(String nameOfFood, boolean like, boolean love) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 210

Copyright Nick Parlante 2017 - privacy