I had some problem of apply interface polymorphism concept into my coding and I wonder if anyone know that there are some handly examples that can help me out (except the one in microsoft)
class jobOne implements jobs
sub executeJobOne() implements jobs.execute
'do something
end sub
end class
class jobTwo implements jobs
sub executeJobTwo() implements jobs.execute
'do something
end sub
end class
class jobThree implements jobs
sub executeJobThree() implements jobs.execute
'do something
end sub
end class
dim arrayOfJobs as jobs() = {new jobOne(), new jobTwo(), new jobThreee()}
for i = 0 to arrayOfJobs.length
arrayofJobs(i).execute()
next
maybe something like that...basically you have the ability to call an objects methods based on its interface implementation because the object is guaranteed to have certain methods
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.