Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Statistics

Authors: Michael Sullivan III

4th Edition

978-032184460, 032183870X, 321844602, 9780321838704, 978-0321844606

More Books

Students also viewed these Programming questions