VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "clsLoanShark"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
' ActiveX: Guide to the Perplexed
' Copyright (c) 1997 by Desaware Inc.  All Rights Reserved
' Chapter 5

Option Explicit

' Internal class object used in aggregation
Private LoanTemplate As New clsBankLoan


Public Property Get AmountAvailable() As Currency
   AmountAvailable = LoanTemplate.AmountAvailable
End Property

Public Property Let AmountAvailable(ByVal vNewValue As Currency)
   LoanTemplate.AmountAvailable = vNewValue
End Property

Public Property Get Duration() As Integer
   Duration = LoanTemplate.Duration
End Property

Public Property Let Duration(ByVal vNewValue As Integer)
   LoanTemplate.Duration = vNewValue
End Property

Public Property Get Interest() As Double
   Interest = LoanTemplate.Interest
End Property

Public Property Let Interest(ByVal vNewValue As Double)
   If vNewValue < 0.5 Then vNewValue = vNewValue + 0.5
   LoanTemplate.Interest = vNewValue
End Property

Public Function Payment() As Currency
   Payment = LoanTemplate.Payment
End Function

Public Function Summary() As String
   Summary = LoanTemplate.Summary
End Function

Public Function SourceType() As String
   SourceType = "Loan Shark"
End Function

Public Function LatePenalty() As String
   Select Case AmountAvailable
      Case 0 To 25000
         LatePenalty = "Broken Fingers"
      Case 25000 To 75000
         LatePenalty = "Broken arm"
      Case Else
         LatePenalty = "You don't want to know"
   End Select
End Function
