Skip to content
csH2019paper
Share
Explore
section 2

icon picker
q-15

Two hundred competitors entered a regional orienteering competition in either the Junior or Senior category. Each competitor received a score based on their performance. The names, categories and scores are stored in a csv file called ‘competitors.csv’. Part of the file is shown below.
Senga Jones,Senior,67
Agnes Adam,Junior,88
...
A program is required to read the data from the csv file and then offer a menu of different options.
part a
The data will be stored in parallel 1D arrays.
Using a programming language of your choice, declare parallel 1D arrays that can store the data for the 200 competitors.
(edit the competitor.java file, the code has been started but is incomplete)
part b
Different options are selected by clicking on a button, one to count Junior Qualifiers and another button the count Senior Qualifiers.
When the ‘Count the number of Junior qualifiers’ option is selected, the user is asked to enter the qualifying score. The program will then count how many Juniors achieved at least that score. An example output is shown below.
'12 Juniors achieved the qualifying score of 42'
Using a programming language of your choice, write the code to ask for a qualifying score and then output the appropriate message.
(edit the competitor.java file)

Loading…


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.