Program 3 – Invoice and Invoice Line Item – Instant Delivery – Perfect Solution
Business Situation:
A business sends out invoices to its customers. An invoice has the following data: Invoice Number, Customer Name, Product Number, Product Description, Quantity, Unit Price, Extended Price, and Invoice Total. This business may have up to 100 invoices, and an invoice may have 10 items at most.
The Application should display the following data on the console: Invoice Number, Customer Name, Product Number, Product Description, Quantity, Unit Price, Extended Price (Unit Price * Quantity), and Invoice Total. There should be one line for each item, and the Invoice Total should be displayed at the end of each invoice.
The following data is given (it also can be used as a display format):
Invoice Number: 1
Customer Name: James Bond
Product Number Description Quantity Unit Price Extended Price
83 Electric Sander 7 67.98 XXX,XXX
24 Power Saw 18 89.99 XXX,XXX
7 Sledge Hammer 11 23.50 XXX,XXX
================================================================
Invoice Total: XXX,XXX
Invoice Number: 2
Customer Name: Ethan Hunt
Product Number Description Quantity Unit Price Extended Price
77 Hammer 76 12.99 XXX,XXX
39 Lawn Mower 3 76.50 XXX,XXX
68 Screwdriver 106 9.99 XXX,XXX
45 Nail-3mm 1000 0.05 XXX,XXX
================================================================
Invoice Total: XXX,XXX
Invoice Number: 3
Customer Name: Ethan Hunt
Product Number Description Quantity Unit Price Extended Price
83 Electric Sander 11 67.98 XXX,XXX
24 Power Saw 28 89.99 XXX,XXX
7 Sledge Hammer 21 23.50 XXX,XXX
================================================================
Invoice Total: XXX,XXX
Programming Requirements:
1. Write a C# Visual Studio Console Application that uses an Invoice and Invoice Line Item classes and display the Invoice data on the console for 3 invoices from two customers.
2. Your application MUST have an Invoice class and MUST use Invoice objects to store the information for invoices. Invoice objects MUST be stored in an array declared in Main() method.
3. Your application MUST have an Invoice Line Item class and MUST use Invoice Line Item objects to store the information for line items.
4. An Invoice class MUST have an array to store the objects of line items.
5. At the beginning of the program, the data for the invoice MUST be assigned and/or Calculated in the Main() method and all invoice-related information MUST be stored only in Invoice and Invoice Line Item objects.
6. The Invoice output should be generated in the Main() of a Company class.