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, 22.06.2019 11:30
What does a cascading style sheet resolve a conflict over rules for an element? a. the rule affecting the most content wins b. the rule affecting the most content loses c. the rule with the most specific selector loses d. the rule with the most specific selector wins
Answers: 2
question
Computers and Technology, 23.06.2019 03:10
Acomputer has a two-level cache. suppose that 60% of the memory references hit on the first level cache, 35% hit on the second level, and 5% miss. the access times are 5 nsec, 15 nsec, and 60 nsec, respectively, where the times for the level 2 cache and memory start counting at the moment it is known that they are needed (e.g., a level 2 cache access does not even start until the level 1 cache miss occurs). what is the average access time?
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Now, open this passage to read about fafsa requirements. describe the information you will need to provide in order to complete a fafsa. list at least three of the required documents you must include.
Answers: 3
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
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, 07.12.2020 19:20
question
Mathematics, 07.12.2020 19:20
question
Mathematics, 07.12.2020 19:20
question
Mathematics, 07.12.2020 19:20
question
Mathematics, 07.12.2020 19:20
Questions on the website: 13722366