Java: Scuba Diving Assignment

When a scuba diver breathes compressed air a certain amount of the gas will be absorbed into the blood and tissues.When the pressure is reduced (upon ascent) the gases will start to dissipate from the tissues.If decompression occurs too fast, super saturation occurs and the diver will suffer the painful symptoms of the “bends”.

Every dive leaves some excess of nitrogen in the body.All this excess will not leave the body until at least twelve hours have passed after the dive.If a “repetitive dive” is made within twelve hours of a “previous dive”, the diver needs to figure in the excess nitrogen time required for his repetitive dive.

The following tables (originally portions of the 1963 US Navy Diving Manual) can be used to determine whether or not decompression is required on a second dive immediately after a previous dive.NOTE: if the second dive is not made immediately, the surface interval time could be used in reducing the need for decompression.We shall assume an immediate second dive.

The procedure for doing this is as follows:

STEP 1:calculate repetitive group designation based on previous dive depth and time,

STEP 2:calculate residual nitrogen time based on repetitive group designation and projected depth of repetitive dive,

STEP 3:calculate equivalent single dive time (sum of residual nitrogen time and projected time of repetitive dive),

STEP 4:determine if decompression is required based upon the projected depth of the repetitive dive and the equivalent single dive time.