Question: Using C# 8. Given the following class and member variable declarations: class Invoice private int mNumber private double mTotal; Provide the missing code below for

Using C#
 Using C# 8. Given the following class and member variable declarations:
class Invoice private int mNumber private double mTotal; Provide the missing code

8. Given the following class and member variable declarations: class Invoice private int mNumber private double mTotal; Provide the missing code below for the Number accessor and mutator. The mutator throws an exception with the message "Invalid invoice number if the value is less than zero. Use the code from question #8 and assume that the Total accessor and mutator as already been coded, code the version of the Invoice constructor that is passed only an 9. invoice number and sets the invoice total to zero. 10. Create a new invoice named myInvoice by calling the constructor coded in question #9 and passing 6400 as the invoice number Given the following variable declarations: Invoice newInvoice new Invoice(18e0); This question uses the Invoice class introduced in questions #8 and #9. Assume that the Total mutator of the Invoice class throws an exception if the value is less than zero. Provide a code snippet to prompt for and store the invoice total in newInvoice as shown the sample run below. Your code snippet must handle exceptions if an exception is thrown. in and re-prompt for the total Enter invoice total: 100 Invalid invoice total. Invalid total must be se e. Enter invoice total: 25

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!