Answered step by step
Verified Expert Solution
Question
1 Approved Answer
*In DR JAVA* Please write notes along the way. There is an example dialog provided so make sure the program runs like it driver file
*In DR JAVA* Please write notes along the way. There is an example dialog provided so make sure the program runs like it
driver file is -
import java.io.*; import java.util.*; public class SalaryAnalyzer { static final String IN_FILE_NAME = "StateOfSC-Salary-List-04012015.txt"; static final String OUT_FILE_NAME = "OVER250000.txt"; static final String DELIM = "\t"; public static void main(String[] args) { System.out.println("Let's see how many state employees make over $250,000 and work at USC."); analyzeEmployeeFile(IN_FILE_NAME); System.out.println("Results have been printed to "+OUT_FILE_NAME); } public static void analyzeEmployeeFile(String fileName) { //TODO: Fill this in } public static void printToSalaryFile(String fileName, String text) { //TODO: Fill this in } }
salary file link is - https://cse.sc.edu/~shephejj/csce145/Labs/StateEmployeePayFiles/StateOfSC-Salary-List-04012015.txt
here is the example dialog make sure it runs properly:
Write a program that analyzes a spread sheet of state employee information. This program is looking for employees who work for the University of South Carolina and makes $250,000 or more per year according to their total income First download the driver file and the salary file. This time you will be adding code in methods specified. Fill in the following methods o analyzeEmployeeFile: This method which takes in a string that corresponds to the file name, opens the file, and then finds the people who work at USC and make in total $250,000 or more per year. The first line in the file should be ignored as that is just header information. The following lines have facts about the state employee which follows this protocol: \t>t>\t>nJob Title> >\tt> Each time a person is found that works at USC and makes over $250,000 this information should be printed to console and to a file. HINT: Store this information and print it to the file all at once at the end. o printToSalaryFile: This method which is assumed to be called by analyzeEmployeeFile, prints out the information discovered by that methodStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started