Answered step by step
Verified Expert Solution
Question
1 Approved Answer
solve in java: public class R 2 { public static void finishMe ( String dashes, String item, double portion, String who, int howMany, String what,
solve in java: public class R
public static void finishMe String dashes, String item, double portion, String who, int howMany, String what, String more
FINISH THIS METHOD USING ALL INPUT VARIABLES
MANIPULATE THE VARIABLES
calculate percentage hint: use math
capitalize the name hint: https:docsoracle.comjavasedocsapijavalangStringhtml
see charAt method
see toUpperCase, toLowerCase methods
see substring method
remember how you can turn anything into a String
use the member access operator to invoke methods on the String objects
remember that no variable changes its value unless there's assignment involved
hint: print your variables to test if you changed them right
WRITE A SINGLE printf STATEMENT
remember how to make placeholders formatted:
with comma separators for thousands,
left or right align
space pad
zero pad
DO NOT ALTER THIS METHOD
public static void main String args
System.out.printlnClementine has planted clementines DIG SOME MORE!" ;
finishMerepeat "chocolate", "MONTY", "eaten", "eat it all!" ;
finishMerepeat "quilt", "ARABELLA", "finished", "how cold are you?!" ;
finishMerepeat "cigarette", "FIN", "confiscated", "smoking is bad for you" ;
finishMerepeat "dog", "MARINA", "adopted", "adopt more" ;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started