Reference no: EM13998901
The speed of sound depends on the material the sound is passing through. Below is the approximate speed of sound (in feet per second) for air, water and steel:
air: 1,100 feet per second
water: 4,900 feet per second
steel: 16,400 feet per second
Write a program class The Speed Of Sound 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 watert with the following formula: time = distance/4,900
You can calculate the amount of time it takes sound to travel in steel with the following formula: time = distance/16,400
Prompts And Output . The program prompts for the medium with: "Enter one of the following: air, water, or steel: " and reads the medium. If the medium is not air, water or steel the program prints the message : "Sorry, you must enter air, water, or steel." an nothing else. Otherwise the program prompts for the distance with ("Enter the distance the sound wave will travel: " and reads it in and then prints "It will take x seconds." where x is the time calculated by your program .
What are the pros and cons of trade restrictions
: What are the pros and cons of trade restrictions? What are the pros and cons of free trade? Which is better in your opinion?
|
Account for the difference in wages between two industries
: What may account for the difference in the wages between two industries that have been highly competitive? Identify and describe each factor and explain its effect on wages. If you make any assumptions about the scenario, state them.
|
Calculate annual depreciation for the five year
: Calculate annual depreciation for the five-year life of the van using each of the following methods. Round all computations to the nearest dollar.
|
Describe how the agency implements the relevant law
: As the human resources manager, it is your responsibility to keep all human resources employees informed about current employment law.
|
Write a program class the speed of sound
: Write a program class The Speed Of Sound 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.
|
What is the present worth of a series
: What is the present worth of a series that gives you $56 in period 1 and then gives you $1 more each time period until period 100 when the interest rate is 5%?
|
Explain how you find the winning strategy
: This game is adopted from episode six of the Survivor Thailand television series that aired in fall 2002. Two players alternate in taking turns to remove some number of flags from a field with 31 flags. Each time it is a player’s turn, he may choose ..
|
Comparison of two hospitals using quality check function
: Perform a comparison of two hospitals using the "Quality Check" function. Prepare a 5-6 page paper based on the following: Select two hospitals to compare in the state you have chosen (click white box next to hospital name to compare)
|
Factor notation the present worth of a cash flow
: How would you describe in factor notation the present worth of a cash flow that gives you $10 in periods zero through 20, then in period 21 gives you $8, in period 22 gives $6, and so on, until period 24 when you recieve $2.
|