• Learn how to create and use a Java Comparator class

Objectives: There are four objectives for this assignment:
•    Learn how to create and use a Java Comparator class
•    To explore different data structures and algorithms for finding the smallest elements in a dataset
•    Compare experimental to theoretical running time results
•    Write a brief experimental results report comparing algorithms
Background: Distributed with the initial code for this assignment is precinct-level voting data from the 2012 presidential election, covering 37 states and a total of 86,476 precincts, based on data from the Harvard Election Data Archive (available under a Creative Commons license) that was cleaned up slightly for this assignment. Thevote2012.dat file in the project`s root directory contains this data, with each line listing a state, county, and precinct followed by the total number of votes for the Democratic candidate (Barack Obama) followed by the number of votes for the Republican candidate (Mitt Romney), with all data fields separated by semicolons. The provided code reads in this file and creates an ArrayList of PrecinctVotes objects for you to work with. Note that not all lines have all fields, so some of the strings fields (like the "county" information) may be empty -- this shouldn`t affect your solution to this assignment.


Price: £ 96

100% Plagiarism Free & Custom Written, Tailored to your instructions

Leave your Comments


Can't read the image? click here to refresh