You are viewing a single comment's thread. Return to all comments →
//yes it's correct, here is my all methods:
public double tip(){
return (tipPercent * mealCost)/100; } public double tax(){ return (taxPercent * mealCost)/100; } public double total(){ return mealCost + tip() + tax(); }
public double roundedTotal (){
return Math.round(total()); }
//but as I said the answer is 15.00 I want it to be 15 (in an integer form )
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
//yes it's correct, here is my all methods:
public double tip(){
public double roundedTotal (){
//but as I said the answer is 15.00 I want it to be 15 (in an integer form )