Question
You are planning a trip on the ocean. On the ocean distance is measured in Nautical Miles (aka knots). A Nautical Mile is equal to
You are planning a trip on the ocean. On the ocean distance is measured in Nautical Miles (aka "knots"). A Nautical Mile is equal to 1.1508 Regular Miles.
You would like to calculate the distance you will travel and the time it will take you to travel that distance at the top speed and the average speed of your boat.
Your program must ask the user to enter the following information and save the values entered into variables (use the types and names below).
- int distanceTraveledInNauticalMiles
- double topSpeedOfTheBoatInKnots
- double averageSpeedOfTheBoatInKnots
Here is sample input/output
Please enter the distance you will travel in Nautical Miles: 18 Please enter the top speed of the boat in knots: 5.8 Please enter the average speed of the boat in knots 4.0
Distanced to travel in Regular Miles: 20.7144 Travel top at top speed: 3.10345 hours at 5.8 knots Travel top at average speed: 4.5 hours at 4.0 knots
Name your program: NauticalMiles_yourInitials.java (yourInitials represents your initials).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Heres an example implementation of the program in Java java import javautilScanner public class NauticalMiles public static void mainString args Creat...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 Started