*

Class Modules Code for Aggregation Mini-Lecture: Day 3

clsCat

Option Explicit
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
Public Property Get Food() As String
    mFood = "Cat will need some chicken and some water"
    Food = mFood
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Cleaner() As String
    mCleaner = "Cat will lick itself clean"
    Cleaner = mCleaner
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Exercises() As String
    mExercises = "Cat will need to play with bed mice or a catnip toy"
    Exercises = mExercises
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Attentions() As String
    mAttentions = "Cat will need to be petted a lot and made a fuss over"
    Attentions = mAttentions
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get VetVisitations() As String
    mVetVisitations = "Cat will need to get shots and checked for parasites"
    VetVisitations = mVetVisitations
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get CareType() As String
    CareType = mCareType
End Property
Public Property Let CareType(ByVal vNewValue As String)
    mCareType = vNewValue
End Property
Public Property Get PetType() As String
    PetType = mPetType
End Property
Public Property Let PetType(ByVal vNewValue As String)
    mPetType = vNewValue
End Property

clsDog

Option Explicit
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
Public Property Get Food() As String
    mFood = "Dog will need something interesting off the counter and some water"
    Food = mFood
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Cleaner() As String
    mCleaner = "Dog will need a bath"
    Cleaner = mCleaner
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Exercises() As String
    mExercises = "Dog will need to chase a ball and run"
    Exercises = mExercises
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Attentions() As String
    mAttentions = "Dog will need to be petted a lot and made a fuss over"
    Attentions = mAttentions
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get VetVisitations() As String
    mVetVisitations = "Dog will need to get shots and checked for parasites"
    VetVisitations = mVetVisitations
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get CareType() As String
    CareType = mCareType
End Property
Public Property Let CareType(ByVal vNewValue As String)
    mCareType = vNewValue
End Property
Public Property Get PetType() As String
    PetType = mPetType
End Property
Public Property Let PetType(ByVal vNewValue As String)
    mPetType = vNewValue
End Property

clsReptile

Option Explicit
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
Public Property Get Food() As String
    mFood = "Reptile will need some rodents and insects and some water"
    Food = mFood
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Cleaner() As String
    mCleaner = "Reptile will shed its skin as needed"
    Cleaner = mCleaner
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Exercises() As String
    mExercises = "Reptile will need a rock for sunning"
    Exercises = mExercises
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Attentions() As String
    mAttentions = "Reptile will need to be petted a lot and made a fuss over"
    Attentions = mAttentions
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get VetVisitations() As String
    mVetVisitations = "Reptile will need to get shots and checked for parasites"
    VetVisitations = mVetVisitations
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get CareType() As String
    CareType = mCareType
End Property
Public Property Let CareType(ByVal vNewValue As String)
    mCareType = vNewValue
End Property
Public Property Get PetType() As String
    PetType = mPetType
End Property
Public Property Let PetType(ByVal vNewValue As String)
    mPetType = vNewValue
End Property

clsRodent

Option Explicit
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
Public Property Get Food() As String
    mFood = "Rodent will need some alfalfa pellets and some water"
    Food = mFood
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Cleaner() As String
    mCleaner = "Rodent will need some dust to roll in"
    Cleaner = mCleaner
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Exercises() As String
    mExercises = "Rodent will need a habitrail"
    Exercises = mExercises
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get Attentions() As String
    mAttentions = "Rodent will need to be petted a lot and made a fuss over"
    Attentions = mAttentions
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get VetVisitations() As String
    mVetVisitations = "Rodent will need to get shots and checked for parasites"
    VetVisitations = mVetVisitations
    RaiseEvent PetCareAdvised(PetType, CareType)
End Property
Public Property Get CareType() As String
    CareType = mCareType
End Property
Public Property Let CareType(ByVal vNewValue As String)
    mCareType = vNewValue
End Property
Public Property Get PetType() As String
    PetType = mPetType
End Property
Public Property Let PetType(ByVal vNewValue As String)
    mPetType = vNewValue
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.