2. [20points]Write a program that allows to read from a file thelastnames of the candidates in an election and the number of votesreceived by each candidate. The program should then output eachcandidate’s name, the number of votes received, and the percentageof the total votes received by the candidate in descendingorder.
Your program should have the following functions:
(a) Write a function openFile that prompts a user to enter afile name and opens it.
(b) Write a function getData that reads from the file thecandidate names and their number of votes received and returns themin 2 separate arrays.
(c) Write a function computePercentages that takes
PayPal Gateway not configured
PayPal Gateway not configured