how do i make the method from what i already have? public class CSVREADER{ String path; Scanner
Fantastic news! We've Found the answer you've been seeking!
Question:
how do i make the method from what i already have?
public class CSVREADER{
String path;
Scanner in;
File fileObj;
int getFileSize(String s){
int size;
while(this.in.hasNextLine()){
this.in.nextline();
size++
}
return size
}
public csvReader(String path){
this.path = path;
this.fileObj = new File(path);
this.in = new Scanner(fileObj);
}
Flight[] getFlights(String f){
Flight flightList = new flight(f);
}
}
Method Name: getFlights Return Type: Flight[] Parameters: String Description: This method receives the name of the file that contains the flights' information. It makes and stores the Flight objects based on the information from the file. Hint: Use .split() to parse the information
Related Book For
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba
Posted Date: