Answered step by step
Verified Expert Solution
Question
1 Approved Answer
**THIS LANGUAGE IS FOR JAVA ONLY** **USE THE SCANNER CLASS FOR INPUT AND SYSTEM.OUT.PRINTIN OR OUTPUT** **USE STRINGS AND IF-ELSE STATEMENT OR IF-ELSE-IF STATEMENT** 12.
**THIS LANGUAGE IS FOR JAVA ONLY**
**USE THE SCANNER CLASS FOR INPUT AND SYSTEM.OUT.PRINTIN OR OUTPUT**
**USE STRINGS AND IF-ELSE STATEMENT OR IF-ELSE-IF STATEMENT**
12. The Speed of Sound The following table shows the approximate speed of sound in air, water, and steel: Medium Air Water Steel Speed 1,100 feet per second 4,900 feet per second 16,400 feet per second Write a program that asks the user to enter "air", "water", or "steel", and the distance that a sound wave will travel in the medium. The program should then display the amount of time it will take. You can calculate the amount of time it takes sound to travel in air with the following formula: Time = Distance / 1,100 You can calculate the amount of time it takes sound to travel in water with the follow ing formula: Time - Distance /4,900 You can calculate the amount of time it takes sound to travel in steel with the follow ing formula: Time Distance / 16,400
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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