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

 

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

Write a method that correctly lists the quantity of a type of item, complete with correct pluralization of the name of the item. Do not pluralize the item if there is only one item. Note that itemQuantity will be 1 or greater. Your pluralization is done simply by adding an "s" to the end of the item, even if that is not the correct pluralization. For example, the correct pluralization of "fish" is "fishes" but for this problem you would use "fishs". So for this problem it is correct to be incorrect in some cases.


orderSystemItem("Honda", 3) → "3 Hondas"
orderSystemItem("Honda", 1) → "1 Honda"
orderSystemItem("Oboe", 1) → "1 Oboe"

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

public String orderSystemItem(String itemName, int itemQuantity) { }

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: 240

Copyright Nick Parlante 2017 - privacy