*

clsPet Code for Aggregation Mini-Lecture: Day 5

Option Explicit

Implements clsIPet

Public Event PetCareAdvised(ByVal TypePet As String, ByVal TypeCare As String)

Private mCareType As String
Private mPetType As String
Private mFood As String
Private mCleaner As String
Private mExercises As String
Private mAttentions As String
Private mVetVisitations As String
Private intPetType As Integer
Private Property Let clsIPet_PetType(ByVal RHS As String)
    mPetType = RHS
    Select Case LCase(mPetType)
        Case "cat"
            intPetType = 200
        Case "dog"
            intPetType = 300
        Case "rodent"
            intPetType = 400
        Case "reptile"
            intPetType = 500
    End Select
End Property
Private Property Get clsIPet_PetType() As String
    clsIPet_PetType = mPetType
End Property
Private Property Let clsIPet_CareType(ByVal RHS As String)
    mCareType = RHS
End Property
Private Property Get clsIPet_CareType() As String
    clsIPet_CareType = mCareType
End Property
Private Property Get clsIPet_Food() As String
    mFood = LoadResString(intPetType + 1)
    clsIPet_Food = mFood
    RaiseEvent PetCareAdvised(clsIPet_PetType, clsIPet_CareType)
End Property
Private Property Get clsIPet_Cleaner() As String
    mCleaner = LoadResString(intPetType + 2)
    clsIPet_Cleaner = mCleaner
    RaiseEvent PetCareAdvised(clsIPet_PetType, clsIPet_CareType)
End Property
Private Property Get clsIPet_Exercises() As String
    mExercises = LoadResString(intPetType + 3)
    clsIPet_Exercises = mExercises
    RaiseEvent PetCareAdvised(clsIPet_PetType, clsIPet_CareType)
End Property
Private Property Get clsIPet_VetVisitations() As String
    mVetVisitations = clsIPet_PetType & " " & LoadResString(102)
    clsIPet_VetVisitations = mVetVisitations
End Property
Private Property Get clsIPet_Attentions() As String
    mAttentions = clsIPet_PetType & " " & LoadResString(101)
    clsIPet_Attentions = mAttentions
End Property


Internet Content Rating Association

Alrak's Course Resources ©2002-2007 Karla Carter. All rights reserved. This material (including, but not limited to, Mini-lectures and Challenge Labs) may not be reproduced, displayed, modified or distributed without the express prior written permission of the copyright holder. For permission, contact Karla.