subject

Please debug the below code in Java please.
// The Invoice class contains invoice number, customer name,// balance due, and tax owed fields,// and methods to set and display the values.// The invoice number must be between 1000 and 9999 inclusive// or else it is set to 0// Tax is 7 % of the balance due// The demonstration program instantiates three Invoices and// purposely assigns invalid values to some of the arguments;// the class methods will correct the invalid values. class Invoice Declarations private num invoiceNumber private string customer private num balanceDue private num tax private void setInvoiceNumber(num number) Declarations num LOW_NUM = 1000 num HIGH_NUM = 9999 if number > HIGH_NUM then invoiceNumber = 0 else if number < LOW_NUM then invoiceNumber = 0 else invoiceNumber = number endif endif return private void setCustomer(string cust) customer = cust return public void setBalanceDue(num balance) balanceDue = balance setTax() return private void setTax(num balanceDue) Declarations num TAX_RATE = 0.07 tax = balanceDue * TAX_RATE return public void displayInvoice() output "Invoice #", invoiceNumber output "Customer: ", customer output "Due: ", balanceDue output "Tax: ", tax output "Total ", balance + tax returnendClassstart Declarations Invoice inv1 Invoice inv2 Invoice inv3 inv1.setInvoiseNumber(1244) inv1.setCustomer("Brown") inv1.setBalanceDue(1000.00) inv1.displayInvoice() inv2.setInvoiceNumber(77777) inv2.setCustomer("Jenkins") inv2.setBalanceDue(2000.00) inv2.displayInvoice() inv3.setInvoiceNumber(888) inv3.setCustomer("Russell") inv3.setBalanceDue(3000.00) inv3.displayInvoice()stop

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
When a rectangular region is defined using an appropriate style, which value matches the specified edge of the clipping region to the edge of the parent element?
Answers: 3
question
Computers and Technology, 23.06.2019 16:00
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
question
Computers and Technology, 23.06.2019 22:00
Jackson, who works in the finance department of a company, is holding a seminar for other employees on how to file taxes. only three employees sign up to attend the seminar. which device can he use to share his presentation with a group of three employees?
Answers: 1
You know the right answer?
Please debug the below code in Java please.
// The Invoice class contains invoice number, cust...
Questions
question
Mathematics, 27.01.2021 20:10
Questions on the website: 13722359