Thursday, April 1, 2010

Defenitions 4/01

Class: Classes are like the containers of objects. They are the blueprints for the behaviors and attributes of objects. To site an example from the book, I am of the human class so I have human characteristics, but as a human object I have my own characteristics that are unique from the human class.


Object: Objects are what are created when you put functions and variables(behaviors and attributes) inside of a class. Again- for example I am of the human class, but I have different properties than other humans so I am my own individual object. For a different example, you might have a general Car class that encompasses all of the cars ever, but then inside of the Car class you have the fordFocus object, which has it's own unique functions like:
void breakdownwhenbrigidneedsyou() - making it unique from other instances of the Car class.


Array: An array is like a list, grocery, laundry, what have you. Arrays are more dynamic than variables because they contain multiple data types, where as with a variable you can only have one data type.

For example, you wouldn't make a grocery list of items where each individual item was on it's own post-it, then take all 30 of those bad boys to the grocery store. You would list all 30 of those items on one piece of paper- or in our terms you would put all 30 string data types into an array of strings!