VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Stock"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Implements Equity
Private stockName As String     'nazwa akcji
Private investment As Single    'wartość inwestycji
Private invDate As Date         'data zainwestowania
Private rate As Single          'stopa wzrostu
Private eq As New Equity        'instancja klasy bazowej

Private Function Equity_calcValue(invDate As Date, toDate As Date, rate As Single, investment As Single) As Variant

End Function

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

Private Function Equity_getTaxable(toDate As Date) As Single
  Equity_getTaxable = Equity_getValue(toDate) - investment
End Function

Private Function Equity_getValue(toDate As Date) As Single
  'oblicz wartość korzystając z metody klasy bazowej
  Equity_getValue = eq.calcValue(invDate, toDate, rate, investment)
End Function

Private Sub Equity_init(nm As String)
  stockName = nm
  rate = Rnd / 10
End Sub

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

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