Alert! Alert! The World Health Organization has warned that 1.1 billion teens are at risk of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Alert! Alert! The World Health Organization has warned that 1.1 billion teens are at risk of hearing loss because of music heard through earbuds where the volume can reach about 102 decibels (dB) if cranked up (~75dB are considered "safe"). It only takes one exposure to excessive sound to damage your hearing. The Central Institute of Loud Invasive Amplitudes, or CILIA, is marketing a gauge that takes in sample music amplitudes. The volume of a sound depends on the amplitude of each value the sound. The amplitude of a value is its absolute value (sound travels in waves). For example, the amplitude of -2300 is 2300, and the amplitude of 4000 is 4000. CILIA has heard (hah!) of your programming prowess, and wants you to write code that will do the following: . Given an array some other CS whiz creates, what, your code will change any value that has an amplitude greater than a given positive integer limit, beQuiet, that is set by the customer. Values greater than beQuiet are replaced in the array what with beQuiet, and values that are less than -beQuiet are replaced with -beQuiet. Return the total number of values that were changed in array what. For example, assume that the array what has been initialized with the following values. D 40 40 2532 -2300 -17 -4000 2000 { -2000 The method heading is given: When your code is started and the customer has randomly set beQuiet to 2000, then the final array should look like: -17 -2000 2000 public int amplitudeChecker 1048 2000 1048 -420 33 (int beQuiet) -420 15 33 -32 15 2030 -32 The method should return 5 since 5 values were changed in the array. Assume that what[] is an instance variable that has been filled with different integer amplitude values, and that the size of the array varies with each use of your code. Assume the customer has provided the desired noise level by initializing the integer variable beQuiet. You will write code for the amplitudeChecker method. It is in the same class as the what[] instance variable and passes beQuiet as a parameter. 2000 3223 2000 Alert! Alert! The World Health Organization has warned that 1.1 billion teens are at risk of hearing loss because of music heard through earbuds where the volume can reach about 102 decibels (dB) if cranked up (~75dB are considered "safe"). It only takes one exposure to excessive sound to damage your hearing. The Central Institute of Loud Invasive Amplitudes, or CILIA, is marketing a gauge that takes in sample music amplitudes. The volume of a sound depends on the amplitude of each value the sound. The amplitude of a value is its absolute value (sound travels in waves). For example, the amplitude of -2300 is 2300, and the amplitude of 4000 is 4000. CILIA has heard (hah!) of your programming prowess, and wants you to write code that will do the following: . Given an array some other CS whiz creates, what, your code will change any value that has an amplitude greater than a given positive integer limit, beQuiet, that is set by the customer. Values greater than beQuiet are replaced in the array what with beQuiet, and values that are less than -beQuiet are replaced with -beQuiet. Return the total number of values that were changed in array what. For example, assume that the array what has been initialized with the following values. D 40 40 2532 -2300 -17 -4000 2000 { -2000 The method heading is given: When your code is started and the customer has randomly set beQuiet to 2000, then the final array should look like: -17 -2000 2000 public int amplitudeChecker 1048 2000 1048 -420 33 (int beQuiet) -420 15 33 -32 15 2030 -32 The method should return 5 since 5 values were changed in the array. Assume that what[] is an instance variable that has been filled with different integer amplitude values, and that the size of the array varies with each use of your code. Assume the customer has provided the desired noise level by initializing the integer variable beQuiet. You will write code for the amplitudeChecker method. It is in the same class as the what[] instance variable and passes beQuiet as a parameter. 2000 3223 2000
Expert Answer:
Related Book For
International Marketing And Export Management
ISBN: 9781292016924
8th Edition
Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr
Posted Date:
Students also viewed these algorithms questions
-
In August 2010, Britains GlaxoSmithKline PLC (GSK) was facing the possibility that its highly profitable diabetes drug Avandia would have to be withdrawn from the US market. Sales of Avandia had...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Did Hopkins materially misrepresent his health when applying for insurance? Does Golden Rule have the right to rescind his insurance policies?
-
Take this version of the MBPT: https://www.16personalities.com/free-personality-test Then answer the following questions in a word doc. 1. What was your MBPT? 2. Have you taken this test before? If...
-
A particle with a charge of - 1.24 X l0-8 C is moving with instantaneous velocity U = (4.19 X 104m/s)i + (-3.85 X l04 m/s)J. What is the force exerted on this particle by a magnetic field (a) B =...
-
Jennifer is a salesperson for a major chemical company doing business in China. To close a multimillion-dollar contract, she has been asked by a Chinese government official for a payment of...
-
Jay's Delivery Company and Astro's Express Delivery exchanged delivery trucks on January 1, 2014. Jay's truck cost $22,000. It has accumulated depreciation of $16,000 and a fair value of $4,000....
-
a) Explain the difference between quantum Mechanics and Classical Mechanics b) Explain the Bohr's form of quantization of Energy [4 mks] [3 mks] c) Calculate the penetration distance for a very small...
-
I. Efficient Two Asset Portfolios Assume that the expected return on asset 1 is 5% and the expected return on asset 2 is 4%. The standard deviation of asset 1 is 3.0% and 1.5% for asset 2. Assume the...
-
Software tech inc. is planning to buy a new machine and replacing an old machine. Old machine was purchased 10 years ago and is fully depreciated but it can still be used for the next 5 years....
-
Chatsworth House is a large, famous British stately home that is the family home of the Duke of Devonshire. The details of the house, the land, and the places to visit at the house can be found on...
-
Your CEO has asked you to provide information on a potential new market for your companys service. What type of report would be most suitable? Why?
-
Compose effective subject lines for the following persuasive email messages: a. A recommendation was sent by email to your branch manager to install wireless networking throughout the facility. Your...
-
Your new podcast channel, School2Biz, offers advice to business students making the transition from college to career. You provide information on everything from preparing rsums to interviewing to...
-
Considering what youve learned about nonverbal communication, what are some of the ways in which communication might break down during an online meeting in which the participants can see video images...
-
For the reaction: 2H2O(l) + 2Cl-(aq) > H2(g) + Cl2(g) + 2OH-(aq) a) Calculate G at 25C. b) Calculate G at 25C when pH2 = pCl2 = 0.250 atm, [Cl-] = 0.335 M and the pH of the solution is 11.98.
-
For a Poisson process of rate , the Bernoulli arrival approximation assumes that in any very small interval of length , there is either 0 arrivals with probability 1- or 1 arrival with probability ....
-
In late 2004, British fashion designer Sara Berman received an unexpected telephone call from Andrea Ragnetti, chief marketing officer for Royal Philips Electronics. Figuring the Dutch company wanted...
-
Identify the potential barriers (or obstacles) that face companies considering or expanding international marketing operations. Which are the most important and which are less important? Explain.
-
Is there a best way for a company to acquire new products for its export product line?
-
In a boiler trial observations made are as: Feed water temperature \(=30^{\circ} \mathrm{C}\) Boiler pressure \(\quad=12 \mathrm{bar}\) Dryness fraction of steam \(=0.80\) Coal consumption...
-
How much heat is to be added to convert \(4 \mathrm{~kg}\) of water at \(20^{\circ} \mathrm{C}\) in to steam at 8 bar and \(200^{\circ} \mathrm{C}\). Take \(C_{p}\) of superheated steam as \(2.1...
-
What do you understand by mechanical and thermal efficiency? A steam plant uses 3 tonne of \(\mathrm{coal} / \mathrm{h}\). The steam is fed to turbine the output of which is \(4 \mathrm{MW}\). The...
Study smarter with the SolutionInn App