Parsing a very large file, do calculations
The Application Should be able to Parse the file Slips and do calculations presenting winning statistics.
The files are
1. All Slips played
2. All Results of the of the Specific games and the odds next to each selection
3. All Odds of Special bets A,B
What is needed is to add on the results a column that calculates The Payout on every selections. That is Amount played over Amount that won
A player can select 1,2,3,4,5,6,7,8,9,19 Events
This means he can select 6 games and bid on any 4,5,6
How can you calculate winnings?
Step 1 If the player plays X number of teams and select all of them then Winings are the multiplication of odds times the amount. In the first example the user has played 2 teams and asks that all 2 win so the odd is 3.6*3*9. In that case if one of the teams was not winner the whole bet would be 0 as the player bids on both both teams
Step 2. In the second case the player mnight select only a subset of the teams that he had bet . For example in the second case he plays on 6 teams but jhe asks for any 3 or 4 or 5 of those teams that win. In that case we have to expand all the colums played to get the winnings
What is asked is to parse the file of the slips played and the files with results and construct a table that where the amount played and the winnings paid will appear.
The file can be even 100.000 lines long
Unless the program is finished no money is paid
The program should ask for an input file and have as output an XL file with all the turnover and payout