public static void problem9_getSoundLevel(Scanner in) { // FILL IN }


Java


public static void problem9_getSoundLevel(Scanner in) {<br>// FILL IN<br>}<br>

Extracted text: public static void problem9_getSoundLevel(Scanner in) { // FILL IN }
problem9_getSoundLevel<br>Sound level L in units of decibel (dB) is determined by<br>20 log10<br>Po<br>where p is the sound pressure of the sound (in Pascals, abbreviated Pa), and po is a reference sound pressure equal to<br>20 x 10-0 (where L is 0 dB). The following table gives descriptions for certain sound levels.<br>Description<br>dB<br>Threshold of pain<br>>= 130<br>Possible hearing damage<br>>= 120 and < 130<br>Jack hammer at 1 m<br>>= 100 and < 120<br>Traffic on a busy roadway at 10 m<br>>= 90 and < 100<br>Normal conversation<br>>= 60 and < 90<br>Calm library<br>>= 30 and < 60<br>Light leaf rustling<br>>= 0 and < 30<br>Implement a method that reads a value and a unit (either dB or Pa) from the user, and prints a string indicating which of<br>the above sound level categories the sound falls into. If the unit entered is not

Extracted text: problem9_getSoundLevel Sound level L in units of decibel (dB) is determined by 20 log10 Po where p is the sound pressure of the sound (in Pascals, abbreviated Pa), and po is a reference sound pressure equal to 20 x 10-0 (where L is 0 dB). The following table gives descriptions for certain sound levels. Description dB Threshold of pain >= 130 Possible hearing damage >= 120 and < 130="" jack="" hammer="" at="" 1="" m="">= 100 and < 120="" traffic="" on="" a="" busy="" roadway="" at="" 10="" m="">= 90 and < 100="" normal="" conversation="">= 60 and < 90="" calm="" library="">= 30 and < 60="" light="" leaf="" rustling="">= 0 and < 30 implement a method that reads a value and a unit (either db or pa) from the user, and prints a string indicating which of the above sound level categories the sound falls into. if the unit entered is not "db" or "pa", print "invalid unit". if the value entered is negative, print "invalid sound level". if invalid unit and negative sound level, print "invalid unit and sound level". assume no other invalid input will occur. when you print the string, use print instead of println (this will make testing/grading easier, since the newline separator that gets inserted using println varies per platform). examples: enter sound level and unit (db or pa): 88.3 db normal conversation enter sound level and unit (db or pa): 0.001 db light leaf rustling enter sound level and unit (db or pa): 0.049 pa normal conversation enter sound level and unit (db or pa): 2.5 pa jack hammer at 1 m enter sound level and unit (db or pa): 3233.33 db threshold of pain enter sound level and unit (db or pa): -0.045 m invalid unit and sound level 30="" implement="" a="" method="" that="" reads="" a="" value="" and="" a="" unit="" (either="" db="" or="" pa)="" from="" the="" user,="" and="" prints="" a="" string="" indicating="" which="" of="" the="" above="" sound="" level="" categories="" the="" sound="" falls="" into.="" if="" the="" unit="" entered="" is="" not="" "db"="" or="" "pa",="" print="" "invalid="" unit".="" if="" the="" value="" entered="" is="" negative,="" print="" "invalid="" sound="" level".="" if="" invalid="" unit="" and="" negative="" sound="" level,="" print="" "invalid="" unit="" and="" sound="" level".="" assume="" no="" other="" invalid="" input="" will="" occur.="" when="" you="" print="" the="" string,="" use="" print="" instead="" of="" println="" (this="" will="" make="" testing/grading="" easier,="" since="" the="" newline="" separator="" that="" gets="" inserted="" using="" println="" varies="" per="" platform).="" examples:="" enter="" sound="" level="" and="" unit="" (db="" or="" pa):="" 88.3="" db="" normal="" conversation="" enter="" sound="" level="" and="" unit="" (db="" or="" pa):="" 0.001="" db="" light="" leaf="" rustling="" enter="" sound="" level="" and="" unit="" (db="" or="" pa):="" 0.049="" pa="" normal="" conversation="" enter="" sound="" level="" and="" unit="" (db="" or="" pa):="" 2.5="" pa="" jack="" hammer="" at="" 1="" m="" enter="" sound="" level="" and="" unit="" (db="" or="" pa):="" 3233.33="" db="" threshold="" of="" pain="" enter="" sound="" level="" and="" unit="" (db="" or="" pa):="" -0.045="" m="" invalid="" unit="" and="" sound="">
Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here