Write an application that will sort the data found in the following table either by KW or CFF. The data represents the price paid for the consumption of electricity and natural gas for a period of six years. Your program should display the original array prior to presenting the user with a selection menu. Your output should look like the one below:

2010 3174.07 839.85
2011 1933.62 840.57
2012 5133.25 668.13
2013 8115.95 1312.63
2014 10665.44 1621.49
2015 10886.72 708.46
1. Ascending sort by KW
2. Ascending sort by CFF
3. Exit

When the user selects either 1 or 2, the program should display the the sorted array corresponding to that selection plus the following appended information before redisplaying the menu:


Total for X years XXXXX.XX
Avg for X years XXXXX.XX

Natural Gas
Total for X years XXXXX.XX
Avg for X years XXXXX.XX

Your program should not exit until the user selects to exit by pressing the number 3.

Hint: Think in parallel

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.