Question: NOTE: write the code in c# Assignment Objective The purpose of this assignment is to read and parse text file data, store this data in
NOTE: write the code in c#
Assignment Objective The purpose of this assignment is to read and parse text file data, store this data in a data structure and print it to the console. You will also be designing a solution for a typical business problem. Your Task
write the code in c# coding You are a developer for a company that sells computer hardware. One of the vendors sends their invoice data in a custom formatted text file. Design a solution that imports this file and stores it in an appropriate data structure. Generate output to the console that emulates the screenshot in this document. Details Write a console application that performs the following steps: 1) read a file containing invoice data 2) parse and store the data in a collection of data classes 3) display the data from the collection to the console The program must do just these three things and then exitthat is all. Obtain the filename via a command line argument. The program must not prompt for a filename or contain a hard-coded filename. The program must be able to handle amounts up to 999, 999.99. The program must also be able to handle 2 taxes, GST and PST. Since we are a reseller, we have a PST license and are exempt from paying PST. (We will always pay GST) Occasionally, we will purchase items for internal use and pay the PST to the vendor. This will be indicated by a flag in each detail line. The tax rates are GST 5% and PST 7%. The format of the file is described below. To keep the assignment from getting too large, your program can assume that the file is always formatted correctly.
Data File Details Name your data file: InvoiceData.txt. Although a data file is included as a sample, you will be creating your own data file. Use Notepad or another text editor to create the file. (Create at least 6 invoices)
Sample:
{
3221409:2019/09/12:215|10:WD2002:2TB Hard Drive:121.66:N|17:KG240S:240GB SSD:125.12:N|21:KG120S:120GB SSD:71.55:N 3221766:2019/09/16:110|1:INX5700HT:8-Core XEON CPU:1437.79:Y|20:IN2300K:4-Core 3.0GHZ CPU:205.00:Y 3221805:2019/09/19:110|2:INXE8000:8-Core XEON CPU:1265.20:Y|20:KG240S:240GB SSD:125.10:N|4:KGDD316G:16GIG DDR3 Memory:120.60:Y
} Each line in the file represents one invoice. There are two delimiter characters, the pipe (|) character delimits the header and line items. The colon (:) character delimits the elements in the header and each line item. High level structure: (first element represents the header followed by one or more line items (Max 10) Header|Line Item 1|Line Item 2|... Header Elements: InvoiceNumber:InvoiceDate:Terms 3221409:2016/01/07:215 InvoiceNumber: AlphaNumeric 8 character max InvoiceDate: YYYY/MM/DD Terms: three digits, first digit is discount percentage (maximum 9) second and third digit is discount period (minimum 10 days) 110 means 1% discount 10 day period Line Item Elements: Quantity:Sku:Description:Price:Taxable 10:WD2002:2TB Hard Drive:121.66:N Quantity: 999 maximum value Sku: 8 characters maximum Description: 20 characters maximum Price: 2decimal places Taxable: Y or N to indicate that PST is payable on this line item

Data Structure Details Design a set of classes to store the parsed data. Determine the classes required and give them appropriate names. Define the fields for each class and use the most appropriate data type for each field. You should have classes for Invoice and Invoice Detail Line. The Invoice should hold the header data and a collection for the detail lines. Include any additional classes that you determine necessary to complete the project. Console Output Details Emulate the screenshot above. Note content, formatting, and alignment. The terms section is created from the terms data. (ADI means After Date of Invoice) There should be no output until all data has been read, parsed and stored in the objects. Read the data from the objects to generate the console output. Note that this screenshot shows the same data as in the file provided pay careful attention to the output and compare to yours to ensure that all of your calculations are correct. Proposed UML Class Diagram

04 COMP2614 - Assignment 03 - Invoice Parser - A009999s9 Invoice Listing Invoice Number: 3221409 Invoice Date: Sep 12, 2019 Discount Date: Sep 27, 2019 Terms: 2.00%15 days ADI Total: 5,088.50 Discount: 101.77 Invoice Number: 3221766 Invoice Date: Sep 16, 2019 Discount Date: Sep 26, 2019 Terms: 1.00%10 days ADI Qty SKU Description Price PST Ext 120INX5700HTIN2300K8-CoreXEONCPU4-Core3.0GHZCPU1,437.79205.00YY1,437.794,100.00 Subtotal: 5,537.79 GST: 276.89 PST: 387.65 Total: 6,202.33 Discount: 62.92 Sample Output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
