Science and Java Scuba Diving The word scuba comes from the acronym for self-contained underwater breathing apparatus. It allows divers to breathe underwater with no con- nection to the surface. Since the divers are not hooked to a tube, they can swim almost anywhere. The divers carry diving cylinders containing a gas mixture at high pressure that is supplied to the diver through a regulator for breathing underwater. The open-circuit scuba systems discharge the ex- haled gas into the environment. Dudarev Mikhail/Shutterstock.com It becomes impossible to breathe air at normal at- mospheric pressure through a tube below 30 feet under the water. The depth range for scuba diving depends on the application and training. The major worldwide recreational diver certification agencies consider 130 feet to be the limit for recreational diving. For most recreational diving, ordinary atmospheric air can be used (21 percent oxygen, 78 percent nitro- gen, 1 percent trace gases). If the diver is experi- enced and competent, he or she may attempt dives deeper than 130 feet. In that case, the diver needs more oxygen and less nitrogen. The most common- ly used mixture is Nitrox. Nitrox is air with extra oxygen (between 32 percent to 36 percent). There- fore, it will contain less nitrogen by percentage. This reduces the risk of decompression sickness, which causes nitrogen gas in the blood to become bubbles as the diver ascends. Blood does not flow if it contains bubbles. Assignment Define a set of variables and constants to mea- sure certain aspects of preparing to dive. You need the following data: a constant for the amount of pressure per square inch, a constant for the per- centage of oxygen in air, a constant for the percent- age of nitrogen in air, a variable for the depth of the dive in feet, a variable input by the user for the per- centage of oxygen in a Nitrox gas mixture, and a variable that stores whether or not that is enough oxygen. Percentages are integers. These variables and constants will be used in a later activity. The normal atmospheric pressure at the sur- face is 14.7 pounds per square inch (psi). As a diver descends, the water exerts increasing hydrostatic pressure of approximately 14.7 psi for every 33 feet of depth. If you have ever swum to the bottom of the deep end of a pool to retrieve an object, you can feel the pressure in your ears. The pressure of the inhaled breath must balance the surrounding increased pressure to allow inflation of the lungs. 88 Introduction to Computer Science: Java Programming Copyright Goodheart-Willcox Co., Inc.