Answered step by step
Verified Expert Solution
Link Copied!

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 R2{
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://docs.oracle.com/javase/7/docs/api/java/lang/String.html
// 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.println("Clementine has 001,2340.002% planted clementines -- DIG SOME MORE!" );
finishMe("-".repeat(4), "chocolate", 0.5, "MONTY", 3002, "eaten", "eat it all!" );
finishMe("-".repeat(2), "quilt", 0.834572, "ARABELLA", 100, "finished", "how cold are you?!" );
finishMe("-".repeat(4), "cigarette", 0.099346666, "FIN", 300000, "confiscated", "smoking is bad for you" );
finishMe("-".repeat(2), "dog", 1, "MARINA", 7, "adopted", "adopt more" );
}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

Explain the reporting for goodwill.

Answered: 1 week ago

Question

Explain the qaulity requirements of a claims processor

Answered: 1 week ago