Speed of Sound
The following table shows the approximate speed of sound in air, water, and steel.
Medium | Speed |
Air Water Steel | 1,100 feet per second 4,900 feet per second 16,400 feet per second |
Create an application that displays a set of radio buttons allowing the user to select
air, water, or steel. Provide a text box to let the user enter the distance a sound wave
will travel in the selected medium. Then, when the user clicks a button, the program should display the amount of time it will take. Format the output to two decimal places.
Input validation: Do not accept distances less than 0. Always check for nonnumeric data.
Use the following test data to determine if the application is calculating properly:
Medium and Distance | Speed of Sound |
Air, 10,000 feet Water, 10,000 feet Steel, 10,000 feet | 9.09 seconds 2.04 seconds 0.61 seconds |
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.