Happy Birthday Anthony and Ernest
Happy birthday Anthony and Ernest!
Being a geek dad we celebrate with the appropriate present and stuff to chill out afterwards.




var myInstance = new MyFunction();
Option Public
Option Declare
%REM
Class BaloonFactory
Description: Creates all sort of Ballons
%END REM
Public Class BaloonFactory
Private currentGas As String
Private currentColor As String
Public Sub New
me.color = "Red"
me.gas ="Helium"
End Sub
Public Property Set Color As String
me.currentColor = Color
End Property
Public Property Set Gas As String
If Gas <> "Helium" And Gas <> "Hydrogen" Then
me.currentGas = "Helium" 'Let us play save
Else
me.currentGas = Gas
End If
End Property
Public Function makeBaloon As Baloon
Set makeBaloon = New Baloon(me.currentColor,me.currentGas)
End Function
End Class
%REM
Class Baloon
Description: We like them in a lot of colors
%END REM
Public Class Baloon
Private currentGas As String
Private currentColor As String
Public Sub New (Color As String, Gas As String)
me.currentColor = Color
me.currentGas = Gas
End Sub
Public Sub POP
MsgBox "You popped a "+me.currentColor+ " baloon filled With " + me.currentGas
End Sub
End Class
%REM
Sub Demo
Description: Comments for Sub
%END REM
Public Sub Demo
Dim factory As New BaloonFactory
Dim b As Baloon
Dim r As Baloon
Dim g As Baloon
Set r = factory.makeBaloon()
factory.Color = "Blue"
Set b = factory.makeBaloon()
factory.Color = "Green"
Set g = factory.makeBaloon()
Call r.POP()
Call b.POP()
Call g.POP()
End Sub

Disclaimer
This site is in no way affiliated, endorsed, sanctioned, supported, nor enlightened by Lotus Software nor IBM Corporation. I may be an employee, but the opinions, theories, facts, etc. presented here are my own and are in now way given in any official capacity. In short, these are my words and this is my site, not IBM's - and don't even begin to think otherwise. (Disclaimer shamelessly plugged from Rocky Oliver)
© 2003 - 2010 Stephan H. Wissel - all rights reserved as listed here:

Unless otherwise labeled by its originating author, the content found on this site is made available under the terms of an Attribution/NonCommercial/ShareAlike Creative Commons License, with the exception that no rights are granted -- since they are not mine to grant -- in any logo, graphic design, trademarks or trade names of any type.