B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=6.5
@EndOfDesignText@
'Class Person module
Sub Class_Globals
	Private mFirstName, mLastName As String
	Private mBirthDate As Long	
End Sub

'Initializes the Person object.
Sub Initialize (FirstName As String, LastName As String, BirthDate As Long)
	mFirstName = FirstName
	mLastName = LastName
	mBirthDate = BirthDate
End Sub

Public Sub GetName As String
	Return mFirstName & " " & mLastName
End Sub

Public Sub GetCurrentAge As Int
	Return GetAgeAt(DateTime.Now)
End Sub

Public Sub GetAgeAt(Date As Long) As Int
	Dim diff As Long
	diff = Date - mBirthDate
	Return Floor(diff / DateTime.TicksPerDay / 365)
End Sub
