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

Java Program With Lists & Integers
Homework Solution
$40.00
Java
Programming
Codes
Algorithms
Linked Lists
File Management
Data Structures
Libraries
Scanner
Zero Sum Subset
Input
Output
Statements
Variables
Positive Integers
Negative Integers
Binary Mask
Pseudo-Codes
Expression Parser in Java
Homework Solution
$50.00
Computer Science
Java Programming
Expression Parser
Strings
Algorithms
Operators
Numbers
File Management
Input
Output
Statements
Mathematical Logic
Loops
Conditions
Optimization
Characters
Java Programming Problems
Homework Solution
$15.00
Programming
Computer Science
Java
Payday
Strings
Earnings
Prices
Services
Statements
Variables
Palindromes
From BS Tree to AVL Tree in Java
Homework Solution
$20.00
Java
Programming
Codes
Algorithms
Binary Search Tree
AVL Tree
Search Operation
Logarithmic Time
Rebalancing
Loops
Statements
Variables
Successors
Ancestors
Parents
Nodes
Edges
Boolean Values
Data Structures
Data Structures Questions
Homework Solution
$25.00
Data Structures
Algorithms
Codes
Computer Science
Stack
Values
API
Implementation
Push
Peek
Pop
Development
Fragments
Summation
Order
Huffman Coding in Java
Homework Solution
$55.00
Computer Science
Huffman Coding
Java
Programming
Algorithms
Characters
Encoding
Decoding
Hamlet
Tables
ASCII
Binary
Computer Networks
Queue
Priority
Branches
Trees
Nodes
Classes
Pairs
Lines
Integers
Bits
Leafs
Functions
Methods
C
Get help from a qualified tutor
Live Chats