Question: need source from NetBeans IDE 8.2 please Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and the total.

 need source from NetBeans IDE 8.2 please Write a program that

need source from NetBeans IDE 8.2 please

Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and the total. Round to the nearest cent. For example, if the user enters 10 for subtotal and 15% for gratuity rate, the program displays $1.5 as the gratuity and $11.5 as the total Implementation: You will need to write a class Mealcheck with a constructor Mealcheck (double subtotal, double gratuityRate) and methods double getGratuity() and double getTotal () to perform the calculations and return the results. Your program should prompt the user for a subtotal and a gratuity rate, then call the constructor to create an object, then call instance methods getcratuity) and getTotal) Here is a sample run: Enter the subtotal and the gratuity rate: 10 15 The gratuity is $1.5 and total is $11.5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!