Question

1. Many commentators today say only a few “Swing states” (states where voters are almost equally divided among Republicans and Democrats) are determining the election.
States with heavy majorities of Republicans or Democrats are less important due to the Electoral college versus the Popular Vote.
Write a two page essay on your evaluation of the statement “Only Swing States matter”, using the election data available in the Election data files provided.
Consider how many “swing states” there are, if these states change the party they vote for often.
Does your data compare with published new articles about this subject?
Your submission should include at least the following:
-A clear description of your approach to evaluating the statement
-Some statistics generated by a program you wrote using the election data
-A reference to news sources about this topic
2. Write a program that uses the file ElectoralVotes.csv and the file Election Data 2012 to calculate the number of electoral votes earned by Obama and Romney in the 2012 election.
Your program should build a lookup table with the state names, another table with the associated electoral votes for that state.
The output should show two numbers – the total electoral votes earned by each candidate.
And print each state’s name, the winner, and number of electoral votes won.

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Scanner;


/**
*
* @author
*/
public class Election {
   
    public static void main(String[] args) {
       ArrayList<ElectionData> eds = new ArrayList<>();
       ArrayList<ElectionVotes> evs = new ArrayList<>();
      
       readElectionData(eds, "ElectionData2012.csv");
       readElectionVotes(evs, "ElectionVotes.csv");
      
       showResult(eds, evs);
    }...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Assisting Tutor

Related Homework Solutions

Explanation For Java Classes
Homework Solution
$30.00
Java
Programming
Computer Science
Codes
Classes
Inheritance
Comparator
Binary Matrix
Labels
Edges
Tree
Strings
LinkedList
Integers
Nodes
Temporary Storage
Statements
Variables
Species
HashSet
Iterator
Java Programming: Printing The Pattern
Homework Solution
$10.00
Java
Programming
Computer Science
Loops
Printing
Patterns
Rows
Loops
Statements
Variables
Integers
Strings
Input
Output
Array Problems in Java: Summation, Average, Min/Max, Searching, Sorting
Homework Solution
$13.00
Java
Programming
Coding
Computer Science
Arrays
Summation
Average
Minimum Number
Maximum Number
Bubble Sort
Selection Sort
Sequential Search
Binary Search
Algorithms
Input
Output
Methods
Integers
Functions
Maze Problem in Java
Homework Solution
$50.00
Java
Programming
Codes
Algorithms
Maze Problem
Classes
Constructor
Stack
Positions
Points
Push
Pop
Symbols
Statements
Variables
Rows
Columns
Strings
Integers
Commands
Pseudo-Code
Generic Method For Java Arrays
Homework Solution
$20.00
Java
Programming
Coding
Computer Science
Arrays
Items
Generic Method
Integers
WordList
Strings
Testing
Primitive Types
Input
Output
Get help from a qualified tutor
Live Chats