[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Class newbie - How to

  • Thread starter Thread starter Rutger Olthuis
  • Start date Start date
Status
Not open for further replies.
R

Rutger Olthuis

Guest
If all of the bong types can execute the same actions, but do it differently, an interface might indeed be useful. Interface iBong: method void ring(). end. define variable myBong as iBong no-undo. class SharpBong implements iBong. class LowBong implements iBong. myBong = new SharpBong(). mybong:ring(). myBong = new LowBong(). mybong:ring(). The interface can do a couple of things for you. Among others: 1. force you to implement the same methods and properties on Classes that have a common ground. 2. allow you to have multiple implementations of the same thing. I know other people can describe it way better than me, but I hope this helps.

Continue reading...
 
Status
Not open for further replies.
Back
Top