Question: Visual Studio (C++) Voting Record Analysis Voting Record Analysis 1: Performance Rating 2: Sinilarity Rating 3: Sunmary Report 0: Exit Given a text file containing
Visual Studio (C++)

Voting Record Analysis Voting Record Analysis 1: Performance Rating 2: Sinilarity Rating 3: Sunmary Report 0: Exit Given a text file containing the voting record of two congressman over a series of issues, write a program that would read and analyze this data. 0.275 0.35 Each row on in the text file represent an issue. The first number on each row shows the issue number. The second number is the vote of congressman A and the third is the vote of the congressman B Congressman A Performance: Congressman B Performance: Voting Record Analysis 1: Perfornance Rating 2: Sinilarity Rating 3: Sunmary Report 0: Exit On a particular issue, having -1 as vote value means congressman voted Nay. 1 means the congressman voted Yea. 0 means the congressman missed the vote Similarity Rate: 0.166667 You will need to create 3 arrays (parallel) that can hold information about each issue (each row of data in the file). (40 points) Voting Record Analysis 1: Performance Rating 2: Sinilarity Rating 3: Sunmary Report 0: Exit You may assume that there can be up to 100 rows in the files we will use with your program and it will always have 3 columns as specified above. Congressman A Below are the required 3 features of the program. For more information please refer to the screenshot of the running program. Yea 17 Nay1 Miss: Congressman B Feature #1: Performance Rating (50 points) The performance rating of a congressman is determined by dividing the number of times that congressman has missed voting on an issue by the total number of issues listed in the file. Performance rating should be reported for both congressman and the program should declare which congressman 1-1 (A or B) has higher rating. Be careful that when you divide two integers, the result will be an integer. We want rating to be a decimal number. I Yea11 Miss: 14 Voting Record Analysis 1: Performance Rating 2: Sinilarity Rating 3: Summary Report 0: Exit would recommend creating variable of type double and assign the values to these double variables to be used in rating calculation. 6 Feature #2: Similarity Rating (50 points) This feature find the number of times the two congressmen voted the same way and divides it by the total number issues in the file excluding where both congressmen miss the vote. In other words, the issues where both congressmen miss the vote should be ignored in this analysis. That means for this analysis, (1) both congressmen missed the vote will not be counted towards the number of times they voted the same way and (2) those issues should also be excluded from the total number of issues in the file 9 -1 0 10 1 1 12 1 -1 13 1-1 14 0 1 Feature #3: Summary Report: (50 points) This feature reports on how many issues congressman A and B voted Yea, Nay or missed the vote 16 1-1 Feature #0: Exit: (10 points) I should be able to exit out of the program by entering zero on the main menu. 18 0 0 19 -1 0 Make sure that your code is commented and indented properly (-50). Make sure that each feature is in its own function. File inputloutput should also be in its own function (-60). Voting Record Analysis Voting Record Analysis 1: Performance Rating 2: Sinilarity Rating 3: Sunmary Report 0: Exit Given a text file containing the voting record of two congressman over a series of issues, write a program that would read and analyze this data. 0.275 0.35 Each row on in the text file represent an issue. The first number on each row shows the issue number. The second number is the vote of congressman A and the third is the vote of the congressman B Congressman A Performance: Congressman B Performance: Voting Record Analysis 1: Perfornance Rating 2: Sinilarity Rating 3: Sunmary Report 0: Exit On a particular issue, having -1 as vote value means congressman voted Nay. 1 means the congressman voted Yea. 0 means the congressman missed the vote Similarity Rate: 0.166667 You will need to create 3 arrays (parallel) that can hold information about each issue (each row of data in the file). (40 points) Voting Record Analysis 1: Performance Rating 2: Sinilarity Rating 3: Sunmary Report 0: Exit You may assume that there can be up to 100 rows in the files we will use with your program and it will always have 3 columns as specified above. Congressman A Below are the required 3 features of the program. For more information please refer to the screenshot of the running program. Yea 17 Nay1 Miss: Congressman B Feature #1: Performance Rating (50 points) The performance rating of a congressman is determined by dividing the number of times that congressman has missed voting on an issue by the total number of issues listed in the file. Performance rating should be reported for both congressman and the program should declare which congressman 1-1 (A or B) has higher rating. Be careful that when you divide two integers, the result will be an integer. We want rating to be a decimal number. I Yea11 Miss: 14 Voting Record Analysis 1: Performance Rating 2: Sinilarity Rating 3: Summary Report 0: Exit would recommend creating variable of type double and assign the values to these double variables to be used in rating calculation. 6 Feature #2: Similarity Rating (50 points) This feature find the number of times the two congressmen voted the same way and divides it by the total number issues in the file excluding where both congressmen miss the vote. In other words, the issues where both congressmen miss the vote should be ignored in this analysis. That means for this analysis, (1) both congressmen missed the vote will not be counted towards the number of times they voted the same way and (2) those issues should also be excluded from the total number of issues in the file 9 -1 0 10 1 1 12 1 -1 13 1-1 14 0 1 Feature #3: Summary Report: (50 points) This feature reports on how many issues congressman A and B voted Yea, Nay or missed the vote 16 1-1 Feature #0: Exit: (10 points) I should be able to exit out of the program by entering zero on the main menu. 18 0 0 19 -1 0 Make sure that your code is commented and indented properly (-50). Make sure that each feature is in its own function. File inputloutput should also be in its own function (-60)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
