Write the classes for the Java program to run as the sample below   Data: Occupation,Number of workers,Location quotient,Mean Hourly Wage,Mean Annual Wage Computer systems analysts,15450,1.6,60.27,125350 Information security analysts,2590,1.1,65.82,136910 Computer and information research scientists,2330,4.6,78.53,163330 Computer network support specialists,2840,0.9,42.8,89020 Computer user support specialists,15640,1.5,37.82,78670 Computer network architects,4550,1.7,71.27,148250 Network and computer systems administrators,6700,1.2,51.3,106700 Database administrators and architects,3830,1.7,55.16,114730 Computer programmers,5690,1.9,60.3,125420 Software developers and software quality assurance analysts and testers,64310,2.6,69.59,144740 Web developers and digital interface designers,5990,2.3,54.76,113910 Computer occupations (all other),21270,3.5,60.33,125480 Actuaries,380,1,53.12,110500 Mathematicians,50,1.1,65.38,135980

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write the classes for the Java program to run as the sample below

 

Data:

Occupation,Number of workers,Location quotient,Mean Hourly Wage,Mean Annual Wage
Computer systems analysts,15450,1.6,60.27,125350
Information security analysts,2590,1.1,65.82,136910
Computer and information research scientists,2330,4.6,78.53,163330
Computer network support specialists,2840,0.9,42.8,89020
Computer user support specialists,15640,1.5,37.82,78670
Computer network architects,4550,1.7,71.27,148250
Network and computer systems administrators,6700,1.2,51.3,106700
Database administrators and architects,3830,1.7,55.16,114730
Computer programmers,5690,1.9,60.3,125420
Software developers and software quality assurance analysts and testers,64310,2.6,69.59,144740
Web developers and digital interface designers,5990,2.3,54.76,113910
Computer occupations (all other),21270,3.5,60.33,125480
Actuaries,380,1,53.12,110500
Mathematicians,50,1.1,65.38,135980
Operations research analysts,2040,1.3,54.69,113760
Statisticians,1910,2.9,61.1,127080
Data scientists and all other mathematical science occupations,3170,3.2,71.48,148680

 

Code:

import java.io.*;
import java.util.Scanner;

class Main
{
publicstaticvoid main(String[] args)
{
Scanner fin;
String lineIn; // To store one line at a time from the file
String[] lineData; // To store an array of data from one line of the file

try
{
// Set up file input reader and open file:
fin = new Scanner(new File("EmploymentDataSF_2020.csv"));
// input the first (header) line from the file.
lineIn = fin.nextLine();
// split on commas, put individual values into lineData array:
lineData = lineIn.split(",");

// THIS IS JUST A DEMO EXAMPLE FOR YOU TO CHANGE:
System.out.println("The first column header is: " + lineData[0]);
System.out.println("The second column header is: " + lineData[1]);
}
catch(IOException e)
{ // handle file i/o errors:
System.out.println("Unable to open file: EmploymentDataSF_2020.csv");
System.out.println(e.getMessage());
return; // end the program
}
catch(Exception e)
{ // handle other errors:
System.out.println("The file EmploymentDataSF_2020.csv isn't in the right format:");
System.out.println(e.getMessage() + "\nOutput file is probably incomplete.");
}
}
}
 
 
Sample Outputs:
/*
** When EmploymentDataSF_2020.csv is not in repl Files: **
Welcome to the Employment Data Analyzer.
Unable to open file: EmploymentDataSF_2020.csv
EmploymentDataSF_2020.csv (No such file or directory)

** When EmploymentDataSF_2020.csv has an incomplete line: **
Welcome to the Employment Data Analyzer.
Enter name of output file to create:
popularJobs.csv
The file EmploymentDataSF_2020.csv isn't in the right format:
5 values should be in each line, separated by commas.
Output file is probably incomplete.

** When EmploymentDataSF_2020.csv is complete: **
Welcome to the Employment Data Analyzer.
Enter name of output file to create:
trash/trash
Unable to open file: trash/trash
trash/trash (No such file or directory)
Enter name of output file to create:
popularJobs.csv
The most common computer occupation in SF is 'Software developers and software quality assurance analysts and testers', with a mean annual wage of $144,740
Data for occupations with more than 10,000 workers saved to popularJobs.csv

> cat popularJobs.csv
Occupation,Number of workers,Location quotient,Mean Hourly Wage,Mean Annual Wage
Computer systems analysts,15450,1.6,60.27,125350
Computer user support specialists,15640,1.5,37.82,78670
Software developers and software quality assurance analysts and testers,64310,2.6,69.59,144740
Computer occupations (all other),21270,3.5,60.33,125480

*/
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY