ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 11 May 2017 My Price 11.00

TestUSCrime.java:12: error: cannot find symbol

I need a mac user..I have the program where it works on the compiler..when I enter the program into the command prompt, Im getting this..any help would be great..

 javac TestUSCrime.java

TestUSCrime.java:12: error: cannot find symbol

    public static void main(String[] args)throws IOException {

                                                 ^

  symbol:   class IOException

  location: class TestUSCrime

1 error

-MacBook-Pro:~ $ javac TestUSCrime.java

TestUSCrime.java:12: error: cannot find symbol

    public static void main(String[] args)throws IOException {

                                                 ^

  symbol:   class IOException

  location: class TestUSCrime

1 error

 ATTACHMENT PREVIEW Download attachment

qattachments_f79633f78a7aa4972583320c6ba436f4b11451bcPage 1YearPopulationViolent crimeViolent crime rateMurder and nonnegligent manslaughter1994 2603270211857670713.6233261995 2628032761798792684.5216061996 2652285721688540636.6196451997 2677836071636096611182081998 2702480031533887567.6169741999 2726908131426044523155222000 2814219061425486506.5155862001 2853175591439480504.5160372002 2879739241423677494.4162292003 2907889761383676475.8165282004 2936568421360088463.2161482005 2965070611390745469167402006 2993984841435123479.3173092007 3016211571422970471.8171282008 3040597241394461458.6164652009 3070065501325896431.9153992010 3093302191251248404.5147222011 3115878161206005387.1146612012 3138736851217057387.8148562013 3161288391163146367.914196

import java.io.File;import java.io.FileNotFoundException;import java.util.Scanner;public class TestUSCrime {static Scanner input = new Scanner(System.in);/*** @param args*/public static void main(String[] args) {long startTime = System.currentTimeMillis();long endTime = 0;System.out.println("********** Welcome to the US Crime StatisticalApplication ******************");/*if (args.length != 1) {System.out.println("Usage: \"java TestUSCrime Crime.csv");return;}*///USCrime[] data = readData(args[0]);USCrime[] data = readData("Crime.csv");String choice;while (true) {displayMenu();choice = getInput();System.out.println();switch (choice) {case "1":showPercentage(data);break;case "2":System.out.println("The Murder rate was highest in " +getMaxMurderYear(data));break;case "3":System.out.println("The Murder rate was lowest in " +getMinMurderYear(data));break;case "4":System.out.println("The Robbery rate was highest in " +getMaxRobberyRateYear(data));break;case "5":System.out.println("The Robbery rate was lowest in " +getMinRobberyRateYear(data));break;case "6":System.out.println("Total Percentage change in motor vehicletheft between(1998-2012) is " + String.format("%.4f",getPercentageChangeMotorVehicle1998_2012(data)) + "%");break;case "7":System.out.println("Total Percentage change in propertycrimes between 1994 and 1998 is " + String.format("%.4f",getPercentageChangeCrimes1994_1998(data)) + "%");break;case "8":System.out.println("Total Percentage change in murder crimesbetween 2012 and 2013 is " + String.format("%.4f",getPercentageChangeMurderCrimes2012_2013(data)) + "%");

public class USCrime {private int year;private int population;private int violentCrime;private double violentCrimeRate;private int murder;private double murderRate;private int rape;private double rapeRate;private int robbery;private double robberyRate;private int assault;private double assaultRate;private int propertyCrime;private double propertyCrimeRate;private int burglary;private double burglaryRate;private int larcenyTheft;private double larcenyTheftRate;private int vehicleTheft;private double vehicleTheftRate;public USCrime(String line) {String[] split = line.split(",");setYear(Integer.parseInt(split[0]));setPopulation(Integer.parseInt(split[1]));setViolentCrime(Integer.parseInt(split[2]));setViolentCrimeRate(Double.parseDouble(split[3]));setMurder(Integer.parseInt(split[4]));setMurderRate(Double.parseDouble(split[5]));setRape(Integer.parseInt(split[6]));setRapeRate(Double.parseDouble(split[7]));setRobbery(Integer.parseInt(split[8]));setRobberyRate(Double.parseDouble(split[9]));setAssault(Integer.parseInt(split[10]));setAssaultRate(Double.parseDouble(split[11]));setPropertyCrime(Integer.parseInt(split[12]));setPropertyCrimeRate(Double.parseDouble(split[13]));setBurglary(Integer.parseInt(split[14]));setBurglaryRate(Double.parseDouble(split[15]));setLarcenyTheft(Integer.parseInt(split[16]));setLarcenyTheftRate(Double.parseDouble(split[17]));setVehicleTheft(Integer.parseInt(split[18]));setVehicleTheftRate(Double.parseDouble(split[19]));}public int getYear() {return year;}public void setYear(int year) {this.year = year;}public int getPopulation() {return population;}public void setPopulation(int population) {this.population = population;}public int getViolentCrime() {

Answers

(11)
Status NEW Posted 11 May 2017 01:05 AM My Price 11.00

-----------

Not Rated(0)