// This class calculates a waitperson's tip as 15% of the bill public class DebugThree1 { public static void main(String args[]) { double myCheck = 50.00; double yourCheck = 19.95; System.out.println("Tips are"); calcTip(myCheck); calctip(yourCheck); } public static int calcTip(int bill) { final double RATE = 0.15; tip = bill + RATE; System.out.println("The tip should be at least " + tip); } }

Respuesta :

I added a decimal format to keep all decimals within the hundredths place. I also changed the calcTip method to void and the argument to a double. Void means the method doesn't return anything and changing bill to type double let's us pass numbers with decimals to the calcTip method. I hope this helps!

Ver imagen Cytokine