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;
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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
You can implement the getFlights method in the CSVREADER class like this public class CSVREADER Stri...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 StartedRecommended Textbook for
Microeconomics An Intuitive Approach with Calculus
Authors: Thomas Nechyba
1st edition
538453257, 978-0538453257
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App