Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective To build a complete working Java program to apply basic data types, arithmetic operations, and dialog-based input/output. Overview & Instructions Write a program to

Objective

To build a complete working Java program to apply basic data types, arithmetic operations, and dialog-based input/output.

Overview & Instructions

Write a program to summarize information for a hiking trip. As you hike, you have some sensors collecting information about your trip including a timer, a step counter, and a count of the number of water bottle fill-ups.

Your program should read the following information as input:

Time of hike (integer seconds)

Number of walking steps taken during walk (integer)

Volume of water consumed during hike (integer number of fill-ups)

Your program should then perform calculations and create a summary similar to what you see below:

Trip Summary:

Time: xx hours xx minutes xx seconds

Distance travelled: xx.x miles

Average speed: x.x mph

Water consumed:

xx.x liters/hour

xx.x liters/mile

You will need to research and correctly apply the required unit conversions for this solution. Assume that the average person's stride length is approximately 71 cm long. Also, you are carrying a 1 quart water bottle. This then can be used with the number of fill-ups to calculate the water consumed.

Include exclusive use of dialog-based input and output for this solution. You are free of course to integrate use of the Java console for testing, but be sure the final solution utilizes dialog boxes. Design your input dialogs to include clear instructions and make sure your output dialog is organized, understandable, and includes proper units. Be sure your decimal outputs are formatted to one decimal place (as indicated in the suggested output model format above).

Be sure to consider documentation, code structure, neatness, and clarity in your final solution. Plz include the dialog boxes boxes for the input and output using JOption.Pane

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

More Books

Students also viewed these Databases questions

Question

5. Structure your speech to make it easy to listen to

Answered: 1 week ago

Question

1. Describe the goals of informative speaking

Answered: 1 week ago