home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 November - Disc 2 / PCNET_CD_2006_11_2.iso / apps / Swishstudio2.exe / Main / Newton.cls < prev    next >
Encoding:
Visual Basic class definition  |  2006-10-05  |  1012 b   |  48 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4.   Persistable = 0  'NotPersistable
  5.   DataBindingBehavior = 0  'vbNone
  6.   DataSourceBehavior  = 0  'vbNone
  7.   MTSTransactionMode  = 0  'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "Newton"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = True
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = True
  14. Dim U
  15. Dim a
  16.  
  17. Public Property Let InitialVelocity(InitVel)
  18.     U = InitVel
  19. End Property
  20.  
  21. Public Property Get InitialVelocity()
  22.     InitialVelocity = U
  23. End Property
  24.  
  25. Public Property Let Accelleration(acc)
  26.     a = acc
  27. End Property
  28.  
  29. Public Property Get Accelleration()
  30.     Accelleration = a
  31. End Property
  32.  
  33. Public Function Distance(t)
  34.     Distance = U * t + a * t * t / 2 ' S=Ut+1/2*at^2
  35. End Function
  36.  
  37. Public Function Velocity(t)
  38.     Velocity = U + a * t
  39. End Function
  40.  
  41. Public Function Popup()
  42.     MsgBox "Hi there", vbOKOnly, "testing"
  43. End Function
  44.  
  45. Public Property Get Version()
  46.     Version = "1.6"
  47. End Property
  48.