In this exercise, please utilize the provided interfaces to construct a program that will read a CSV file from the resources directory, apply the rules defined below and write a new file back to the resources directory
Make the changes needed to:
- Read data.csv from the root directory
- Filter out the line items where the line_item_type is refund
- When duplicate line_item_ids are encountered, keep the line item that has the highest cost
- Write the filtered content to new CSV file called data-filtered.csv
There are three interfaces provided. Please use them to construct your program.
Additionally, there is a utility to parse a CSV line. CSVHelper