subject
Computers and Technology, 13.03.2020 00:54 Ree0628

Define a public static method named iceCreamPrice2 that computes and returns the total price (a double data type) of an ice cream cone. This method has 2 parameters in the following order: -- size of the ice cream cone (a char data type) -- number of toppings (an int data type) The price for a large ('L') ice cream cone is 4.00 The price for a medium ('M') ice cream cone is 3.00 The price for a small ('S') ice cream cone is 2.00 If another size is passed to this method - treat it as a large Toppings cost 0.50 per topping, you can assume the number of toppings will be a whole number greater or equal to 0 Here are some test cases with expected results: iceCreamPrice2('S', 1) --> 2.50 iceCreamPrice2('M', 0) --> 3.00 iceCreamPrice2('L', 3) --> 5.50 iceCreamPrice2('Z', 1) --> 4.50

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
4.11 painting a wall (1) prompt the user to input integers for a wall's height and width. calculate and output the wall's area (integer). note that in this case there is a new line after each prompt. (submit for 1 point). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet (2) extend to also calculate and output the amount of paint in gallons needed to paint the wall (floating point). assume a gallon of paint covers 350 square feet. store this value in a variable. output the amount of paint needed using the %f conversion specifier. (submit for 2 points, so 3 points total). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet paint needed: 0.471429 gallons (3) extend to also calculate and output the number of 1 gallon cans needed to paint the wall. hint: use a math function to round up to the nearest gallon. (submit for 2 points, so 5 points total). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet paint needed: 0.471429 gallons
Answers: 3
question
Computers and Technology, 22.06.2019 12:00
Which of the following “invisible” marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Describir textbook icon_person mira los dibujos y describe lo que está pasando. usa los verbos de la lista.
Answers: 1
question
Computers and Technology, 22.06.2019 21:10
Dameas communication challenge is due to which factor
Answers: 2
You know the right answer?
Define a public static method named iceCreamPrice2 that computes and returns the total price (a doub...
Questions
question
English, 30.03.2021 05:50
question
History, 30.03.2021 05:50
question
Mathematics, 30.03.2021 05:50
question
History, 30.03.2021 05:50
question
Chemistry, 30.03.2021 05:50
question
Chemistry, 30.03.2021 05:50
Questions on the website: 13722360