0

Not axactly a question but this is an assignment I've been working on and it's giving me errors maybe a new set of eyes can help

You are developing an application for invoicing. Create a class called Purchase. Each purchase must have an invoice number, amount of sale and an amount of sales tax. You have been reminded that you need to include set methods for the invoice and sale amount. For the set method of the sale amount, calculate the sales tax as 5% of the sale amount. You have been again reminded that you need to include a display method that displays all the purchases details. You are about to complete the exciting system. Now code an application that declares a purchase object and promts the user for purchase details. When this prompt is made, do not allow the user to proceed until a number between 1000 and 6000 inclusive has been entered. When the system prompts for a sale amount, it must not proceed until the user has entered a non-negative value. In the event a valid purchase object has been created, display the objects invoice number, sales amount and sales tax. https://code.sololearn.com/cFEe2PBNdasl/?ref=app

5th May 2023, 1:42 PM
Makhumo Mashishi
Makhumo Mashishi - avatar
2 Antworten
+ 2
Code is case sensitive, on line 15 you have saleAMount, it should be saleAmount, like you defined as an argument.
5th May 2023, 2:24 PM
Etienne Hosman
Etienne Hosman - avatar
+ 1
Thank you, I'll fix it
5th May 2023, 2:31 PM
Makhumo Mashishi
Makhumo Mashishi - avatar