Jan 23, 2014, 12:11 PM
Post #1 of 4
The code should be written in Perl should be commented appropriately. The solution should be executable, portable and should not have any undefined functions. Use of standard libraries is fine.
The solution will be judged on efficiency, portability, readability and completeness.
The BANK keeps track of the customer spending behavior by categorizing the purchases into pre-defined categories like groceries, entertainment and fuel. There are no other categories to consider for this task
The log recorded by the software is in the following format:
A reference file has been provided below to test out the code.
Write a program/script to parse this information and
1. Generate a report(output file) total amount spent by each customer
2. Generate a report (output file) listing their spending in each category
3. Generate a report (output file) by sorting the list of customers based on highest spenders in each category (groceries, fuel, tobacco-liquor)
Here an example of a log file.
Sample output for first question should look something like this:
Total amount spent by each Customer:
Vinh: $ 65.65
Jane: $ 14.20
Tim: $ 32.8