The following table shows the approximate speed of sound in air, water, and stee
ID: 3716815 • Letter: T
Question
The following table shows the approximate speed of sound in air, water, and steel. Air: 1,100 feet per second Water: 4,900 feet per second Steel: 16,400 feet per second Design a program that displays a menu allowing the user to select air, water or steel. After the user has made a selection, he or she should be asked to enter the number of seconds the sound will travel in the selected medium. The program should then display the distance the sound will travel. I need this coded in JAVA. Due in two days... Thank you so much!
Explanation / Answer
Please find my implementation.
Output:
Select one of following options
1 for air
2 for water
3 for steel
4 for quit
Enter your choice :
1
Enter Distance to be travelled :
345
Time required to travel in air is 0.31 Seconds
Time required to travel in steel is 0.02 Seconds
Process finished with exit code 0
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.