<% "******* *********************************************************** 'purpose: template, write class vbs class when applied directly on it.' author: NEW YORK frog Prince 'variable: WawaValue (private variable)' name (process-level variable) 'property: propertywawa (set or get WawaValue Value) 'Method: FunctionWawa (Return a greeting word and a name)' ********************************************* ************************ Class Wawa 'Create a class private wawavalue "Create an internal private variable private sub class_initialize () defined class Initialization Event Response.write ("WAWA class is created
") WAWAVALUE = 1 End Sub Private Sub Class_Terminate 'Sets the Terminate event. 'Empty event Response.Write class definition ( "
wawa class are cleared") End Sub Public Property Let propertywawa (ByVal wawa_arg)' a let property WawaValue custom class = wawa_arg End Property Public Property Get propertywawa () ' propertywawa get attribute defines a class = WawaValue End property Public Function functionwawa (ByVal wawa_arg) 'defines a method of a class Dim name, value name = "frog" functionwawa = wawa_arg name End FunctionEnd ClassDim a, b, cSet wawaTemp = New WAWA 'Instantiation Wawatemp.Propertywawa = "Hello, Frog Frog" Set Properties A = Wawatemp.Propertywawa' Accessing Properties B = Wawatemp.FunctionWawa ("Goodbey") 'Accessing Class How to Access Class RESPONSE.WRITE a) Response.write ("
") Response.write (b)%>