Create a class named purchase each purchase contains an


Create a class named Purchase. Each purchase contains an invoice number, amount of sale, and amount of sales tax. Include set methods for the invoice number and sale amount. Within the set () ethod for the sale amount, calculate the sales tax as 5% of the sale amount. Also include a display method that displays a purchases detail. Save as Purchase

Create an application that declares a Purchase object nand prompts the user for purchase details. When you prompt for an invoice number, do not let the user proceeed until a number between 1000 and 8000 has entered. When you prompt for a sale amount, do not proceed until the user has entered a nonnegative value. After a valid urchase object has been created, display the objects invice number, sale amount, and sales tax. Save as CreatePurchase.java

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a class named purchase each purchase contains an
Reference No:- TGS01249771

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)