Question: import java.util. * ; import java.io . * ; public class LabProgram { public static void main ( String [ ] args ) { Scanner
import java.util.;
import java.io;
public class LabProgram
public static void mainString args
Scanner scnr new ScannerSystemin;
int size;
Input # of customers and create parallel arrays
size scnrnextInt;
String names new Stringsize;
double debt new doublesize;
String states new Stringsize;
Fill arrays with data from external file described in another section
readCustomerDatanames states, debt;
Type your code here
Read customer information from text file
Make no changes to the following code
public static void readCustomerDataString names, String states, double debt
Read all data from file
try
File f new FileCustomerNamescsv;
Scanner scnr new Scannerf;
scnruseDelimiterr
;
for int index ; index names.length; index
namesindex scnrnext; last name
statesindex scnrnext; state of residence
debtindex scnrnextDouble; amount of debt
scnrclose;
What if data file not found?
catchIOException e
System.out.printlnFailed to read the data file: ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
