title: Java design question
body: <p>I working on an application as an hobby project. It is written in Java and part of a system to calculate decompression scheme for scuba diving.
  The problem I have is in the class that stores my diveplan, well it is not realy a problem since it works fine but I got the feeling it can be designed better so i would like to ask for some feedback.</p>
  
  <p>What I got now is the following.</p>
  
  <p>A class <code>DivePlan</code> which has an ArrayList of DiveOpperations (<code>ArrayList&lt;DiveOpperation&gt;</code>).
  The <code>DivePlan</code> class has 3 functions. One to plan a descent, one to plan an ascent and one to plan a flat dive on the same depth. All these functions add a <code>DiveOpperation</code> object to the ArrayList. However ascents and descents have some other attributes as a dive that stays on the same depth. For example the speed in m/s of the ascent/descent. I set it to a speed of 0 for flat dives for now but that doesn't feel right. I'm aware I should make separate classes that extends the <code>DiveOpperation</code> but that way I don't know if it is an <code>ascent</code>, <code>descent</code> or <code>flatdive</code> class when I get it out of the array.</p>
  
  <p>What would be a good design for such functionality?</p>