Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions