The below program reads the storm Ids and Wind speed from a file and categorizes them after calculating the wind KTS
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Scanner;
public class stormConverter {
public static void main(String[] args) throws
IOException {
// TODO Auto-generated method
stub
Path path =
Paths.get("C:\\Users\\msounda6\\Projects\\Cg\\storm.txt");
//Using scanner to read the
input from File
Scanner scanner = new
Scanner(path);
System.out.println("Read text file
using Scanner");
//read line by line
String [] tempArray = new
String[3];
int windSpeed;
double windKts;
String category="";
while(scanner.hasNextLine()){
//process
each line
String line =
scanner.nextLine();
tempArray=line.split(" ");
windSpeed=Integer.parseInt(tempArray[1]);
//Calculate the
windKts
windKts =
0.539957*windSpeed;
//Categorize
based on Wind Kts
if
(windKts>=120)
category="Super Cyclonic Storm";
else if
(windKts>=90 && windKts<120)
category="Extremely Severe Cyclonic
Storm";
else if
(windKts>=64 && windKts<90)
category="Very Severe Cyclonic Storm";
else if
(windKts>=48 && windKts<64)
category="Severe Cyclonic Storm";
else if
(windKts>=34 && windKts<48)
category="Cyclonic Storm";
else if
(windKts>=28 && windKts<34)
category="Deep Depression";
else if
(windKts>=17 && windKts<28)
category="Depression";
System.out.print(line+"\t"+category+"\n");
}
scanner.close();
}
}
F910 F1112 F F2 F3 10 Points) Question 6 center, a closed low- A tropical cyclone is a rapidly rotating storm system characterized b) level atmospheric circulation, strong winds, and a spiral arr...
A rapidly rotating storm system characterized by a low-pressure center, a closed low-level atmospheric circulation, strong winds, and a spiral arrangement of thunderstorms that produce heavy rain is known as a _______. 1- sharknado 2- hurricane 3- tornado 4- frontal system 2)What general cloud shape is pictured below? 1- nimbo-form 2-cirro-form 3- strato-form 4-cumulo-form. 3)Which layer of the atmosphere extends between 50 km to 85 km above Earth's surface and is where most meteor burn up in the sky? 1-...