Closed

# We are ask to do the judging and result calculation

This project was awarded to ricardofranco for \$100 USD.

\$50 - \$100 USD
4
###### Project Description

We are ask to do the judging and result calculation
The ruby program should be able to

Step 1:
Read a text-file with a set of rankings, put the information from the text-file into a Ruby data structure and display the information from the content of the data structure.

Step 2:
Read a text-file with a set of rankings, compute and display a resulting ranking and a ranking score by use of the skating-rule as described above to transform the set of rankings.

The ruby program shall do this and this only.
You may assume that there are exactly 6 couples and 7 judges.
You may also assume that the input text-file has already been validated, so that only text-files that are correct sets of rankings and correctly formatted are used as input.
The format of the input file is 6 lines each with the information for the couple number

, , ,...,

Notice that is an integer and that is the rank judge i has given the couple with the number .

34,1,2,2,2,6,6,6
55,2,5,5,5,5,5,5
66,3,4,4,4,3,3,3
67,4,3,3,3,2,2,2
68,5,1,1,1,4,4,4
69,6,6,6,6,1,1,1

Rule 1.
First rank the couple according to lowest value of m.

Rule 2.
If two or more couples have same value of m, decide the rank between them according to the highest number of marks in the interval 1 to m.

Rule 3.
If after having applied rule 1 and 2 two or more couples still tie, decide the rank between them according to lowest value of s.

Rule 4.
If two or more couples after applying rule 1, 2 and 3 have the same rank they should be awarded the same rank-score, which is adjusted relative to the rank in the following way:
In case two couples tie for the 1st place their rank-score should be 1,5.
In case 3 couples tied for the 4th place their rank-score should be 5.
In general k tied couples share a rank-score which is rank + (k-1)/2.

Marks from in-data
34, 1, 2, 3, 3, 1, 6, 5
55, 3, 3, 1, 1, 2, 5, 6
66, 2, 4, 4, 4, 3, 3, 3
67, 4, 5, 5, 5, 6, 2, 2
68, 5, 1, 2, 2, 4, 4, 4
69, 6, 6, 6, 6, 5, 1, 1

Start-number Rank Score
55 1 1.5
34 1 1.5
66 3 3.0
68 4 4.0
67 5 5.0
69 6 6.0

## Hire Freelancers who also bid on this project

• Forbes
• The New York Times
• Time
• Wall Street Journal
• Times Online