Written by Chris Walker
But what if none of the existing objects work for you? Then you can create your own objects. They can have the methods and properties that you need. You can create multiple instances of each object type. By creating your own constructor and passing it the right values, you can churn objects out like a little factory.
In the video, I create a couple of properties of name and species on an animal object. Then according to the song, I need to test if a horse really is a horse and if you can talk to that horse. Those two methods rely heavily on the two methods. I also create a couple more objects that are not a horse and can’t talk. So there is a bit of testing as well.
In the end, it all adds up to one crazy video.
Of course. Of course.[youtube http://www.youtube.com/watch?v=q5Sfkmf4_mI]
Go To An Older Location
Go To A Newer Location