Question: You are to write a program to simulate a political poll for the upcoming US presidential election. You will prompt the user to enter data
You are to write a program to simulate a political poll for the upcoming US presidential election. You will prompt the user to enter data until they wish to stop. Therefore you will not know how much data will be entered. You must use dialog boxes for all data input, but you may use System.out statements for your output
You must read in at least to sets of data
The program has been started for you in the file votejava that is stored with this assignment.
Each set data to read in is:
The gender of the voter Male Female
The age of the voter
The Presidential candidate the voter will choose Harris Trump
You will then print the following statistics for this poll of voters:
The Total number of voters
Total number of voters for Harris
Total number of voters for Trump
The Candidate who got the most votes
Total number of female voters
Total number of male voters
Total percent of female voters for Harris
Total percent of female voters for Trump
Total percent of male voters for Harris
Total percent of male voters for Trump
Total percent of young under voters for Harris
Total percent of young under voters for Trump Assignment # Java Loop points
Due DateOct nothing accepted lateNote there are a few extra days for this
assignment
You are to write a program to simulate a political poll for the upcoming US presidential
election. You will prompt the user to enter data until they wish to stop. Therefore you will
not know how much data will be entered. You must use dialog boxes for all data input, but
you may use System.out statements for your output
You must read in at least to sets of data
The program has been started for you in the file "vote.java" that is stored with this
assignment.
Each set data to read in is:
The gender of the voter Male Female
The age of the voter
The Presidential candidate the voter will choose Harris Trump
You will then print the following statistics for this poll of voters:
The Total number of voters
Total number of voters for Harris
Total number of voters for Trump
The Candidate who got the most votes
Total number of female voters
Total number of male voters
Total percent of female voters for Harris
Total percent of female voters for Trump
Total percent of male voters for Harris
Total percent of male voters for Trump
Total percent of young under voters for Harris
Total percent of young under voters for Trump
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
