After a year hiatus from Computer Science courses in college, im back to hitting them hard for the next two years straight. In the next few weeks before classes start again I have been trying to refresh my memory on key concepts by writing and trying to explain them to people that have never gotten deeper into a computer than Word, or Excel, maybe even just Photoshop.
Right now i'm trying to explain Objects and Classes, using the cookie cutter is a class and a cookie is an object.
In trying to explain Objects I thought that starting with trying to describe a Cookie would be easy and I described it like so.
Dinosaur_Cookie_Name = "T-Rex" Dinosaur_Cookie_Frosting_Colour = "Green" Dinosaur_Cookie_Eaten = False
And then I was going to explain how these have no linking between them and that if you wanted to say that
my_cookie = Dinosaur_Cookie_Name
it doesn't necessarily mean that it's also green and uneaten.
So I was then going to explain that by making
my_cookie a list, you could then iterate through the list to access properties and tada, a sort of rudimentary object. Afterwards would then be, tada here is what an object is.
That's where I froze. In the year since learning about Objects in my beginning C++ class I couldn't remember how I made the jump TO Objects. I remember a little talk about name spaces and pointers but thats about it.
So do objects store properties in an array? Would it be appropriate in teaching about Objects to have a middle step of a list, between non-associated variables and an object?