Results 1 to 7 of 7

Thread: Class attributes (NewB QUESTION)(RESOLVED)

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    38

    Class attributes (NewB QUESTION)(RESOLVED)

    Currently i have a class called clsLoanPolicy which is as below:
    VB Code:
    1. Option Explicit
    2.  
    3. Private cMaxLoanLimit As Currency
    4. Private iOverdueCharges As Integer
    5.  
    6. Public Property Get MaxLoanLimit() As Variant
    7.     MaxLoanLimit = cMaxLoanLimit
    8. End Property
    9.  
    10. Public Property Let MaxLoanLimit(ByVal vNewValue As Variant)
    11.     cMaxLoanLimit = vNewValue
    12. End Property
    13.  
    14. Public Property Get OverdueCharges() As Variant
    15.     OverdueCharges = iOverdueCharges
    16. End Property
    17.  
    18. Public Property Let OverdueCharges(ByVal vNewValue As Variant)
    19.     iOverdueCharges = vNewValue
    20. End Property

    What must i add in the class that will set the cMaxLoanLimit and iOverdueCharges as 200 and 2 respectively.

    Then when users create objects of the class, they can use the getters to get the attributes value which should show 200 and 2
    and also to use setters to set new attributes values.
    In other words, making this class a sort of file to permanently store the attributes.
    Last edited by yyayl; Apr 15th, 2003 at 07:17 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width