how to design a class that stores in a distance field the distance, in feet, tra
ID: 3634514 • Letter: H
Question
how to design a class that stores in a distance field the distance, in feet, traveled by a sound wave. the class should have the appropriate accessor and mutator methods for this field. in addition, the class should have the following methods:getSpeeAir: this method should return the number of seconds in would take a sound wave to travel, in air, the distance stored in the distance field. The formula to calculate the amount of time it will take the sound wave to travel the specified diance in air: Time = distance/1100
getSpeedInWater: this method should return the numbe of seconds it would take a sound wave to travel, in water, the distance stored in the distance field. the formulaa to calculate the amount of time it will take the sound wave to travel the specified distance in water is: Time = distance/4900
getSpeedInSteel: this methof should return the number of seconds it would take a sound wave to travel, in steel, the distance stored in the distance field. the formula to calculate the amount of time it will take the sound wave to travel the specified distance in air is: Time = distance/16400