VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Bond"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Implements Equity
Private stockName As String
Private investment As Single
Private invDate As Date
Private rate As Single

Private Function Equity_getName() As String
  Equity_getName = stockName
End Function

Private Function Equity_getTaxable(toDate As Date) As Single
  Equity_getTaxable = 0
End Function

Private Function Equity_getValue(toDate As Date) As Single
  Dim diff, value As Single
  
  diff = DateDiff("d", invDate, toDate)
  value = (diff / 365) * rate * investment + investment
  Equity_getValue = value
End Function

Private Sub Equity_init(nm As String)
  stockName = nm
  rate = 0.05
End Sub

Private Sub Equity_invest(amt As Single)
  invDate = CVDate(Date$)
  investment = amt
End Sub

Private Function Equity_isBond() As Boolean
  Equity_isBond = True
End Function
