Please complete the following program fragment so that it pròduces the output given in the sample output below. File inFite = new Fite("input.txt"): Printriter out nee Printwriter("output.txt"); Scanner in = new Scanner(inFite); in.hextLinel; whitelin. hasNextLine()) { String Line in.nextLine(): Scanner tineScanner= nee Scanner(line): while(LineScanner.hasNext)) { /your code goes here if(magnitude4.0( System.out. print ln(date +"+ time "". tat + longt): Sample Output: 03/24/20 03:45:03 22.01 120.32 10/13/20 02:12:38 20.01 125.5 Input.txt Date .e1/10/20 e7:51:16 03/24/20 83:45:03 1e/13/20 82:12:38 Long 121.41 120.32 125.5e Time Lat. 23.66 22.01 20.01 Kagnitude 5.77 4.81 4.56 A. String date Lirescanner.rext(; String tine Lirescanner.rextili String lat Liescarner.sext): String leng- Lirescanner.rext; doub le nagnitude- Línescarner.nestdouble() B. int date Linescaner.nestOH int tine Linescatrer.nestl; String lat Linescarner.sextDoublel String langt = lineScaner.nextDoublet1; doun le nagnitade inescanner.nextDeuble); C. String date Lirescanner.rext()s String time LineScanner.rextt); doub le lat Linescarner. sextDoublel); double lengt LineScarner.nextDoublet double nagnitude Linescarner.nextDouble: D. string date tirescanner.rext(): String tine -LineScanner.rest() int tat linescanner, nextint0 int loegt Línescarner.caxtInti dounle nagnitude- tinescarner,nextdouble(1; O A OC OB OD

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Please complete the following program fragment so that it pròduces the output given
in the sample output below.
File inFile = new Fite("input.txt"):
Printriter out nee Printwriter("output.txt");
Scanner in = new Scanner(inFite);
in.hextLinel;
whitelin.hasNextLine()) {
String tine in.nextLine();
Scanner tineScanner = new Scanner(line):
while(LineScanner.hasNext(0){
/your code goes here
if(magnitude>4.0{
System.out.print Ln(date +"" + time "". tat "+ Longt);
Sample Output:
e3/24/20 03:45:03 22.01 120.32
10/13/20 02:12:38 20.01 125.5
Input.txt
Date
01/10/20 07:51:16
03/24/20 03:45:03
10/13/20
Long
121.41
120.32
125.5e
Time
Lat.
23.66
22.01
20.01
Magnitude
6.77
4.81
4.56
82:12:38
A.
String date - Lirescanner.test{;
String tine Linescanner.rextils
String lat = linescarner.sext):
String leng- Lirescanner.rext();
doub le nagnitude - Linescarner.nestdouble0
B.
int date Linescanner.nestC:
int tine Linescarrer.next(1;
String lat - Linescanner.sextDoublel
String lengt z linescaner.nextDoublet;
dounle nagnitude inescarner.nextDouble();
C.
String date urescanner.rext(:
String tise Lirescanner.rextt);
double lat linescarner.seaDoublel);
double lengt LineScarner.nextDoubleI
double nagnitude = Linescarner.nextdouble0:
D.
string date tirescanner.rext();
String tine Lirescanner.rest
int lat
int longt Linescarner.raxtInti):
dou le nagnitude- tinescarner,nextbouble(1;
linescanner, nextint(i
O A
OB
OD
oooo
Transcribed Image Text:Please complete the following program fragment so that it pròduces the output given in the sample output below. File inFile = new Fite("input.txt"): Printriter out nee Printwriter("output.txt"); Scanner in = new Scanner(inFite); in.hextLinel; whitelin.hasNextLine()) { String tine in.nextLine(); Scanner tineScanner = new Scanner(line): while(LineScanner.hasNext(0){ /your code goes here if(magnitude>4.0{ System.out.print Ln(date +"" + time "". tat "+ Longt); Sample Output: e3/24/20 03:45:03 22.01 120.32 10/13/20 02:12:38 20.01 125.5 Input.txt Date 01/10/20 07:51:16 03/24/20 03:45:03 10/13/20 Long 121.41 120.32 125.5e Time Lat. 23.66 22.01 20.01 Magnitude 6.77 4.81 4.56 82:12:38 A. String date - Lirescanner.test{; String tine Linescanner.rextils String lat = linescarner.sext): String leng- Lirescanner.rext(); doub le nagnitude - Linescarner.nestdouble0 B. int date Linescanner.nestC: int tine Linescarrer.next(1; String lat - Linescanner.sextDoublel String lengt z linescaner.nextDoublet; dounle nagnitude inescarner.nextDouble(); C. String date urescanner.rext(: String tise Lirescanner.rextt); double lat linescarner.seaDoublel); double lengt LineScarner.nextDoubleI double nagnitude = Linescarner.nextdouble0: D. string date tirescanner.rext(); String tine Lirescanner.rest int lat int longt Linescarner.raxtInti): dou le nagnitude- tinescarner,nextbouble(1; linescanner, nextint(i O A OB OD oooo
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education