0.1.6 Intro to Objects

In the board game of Parcheesi you control physical pawns. There are 16 pawns in a game of Parcheesi, but if you wanted to be specific you would refer to one specific red pawn as an object, and that would be an instance. An instance of a specific item. 16 pawns, 4 of each color of red, blue, green, and yellow. An object is a very specific instance of it. Just as you or I are unique people, each object is a unique instance of what it is. We are unique instances of people, and may have traits that others may not have.

Objects have values and can be references by other things. Terms like “variables” and “data structures” can be used to represent what objects are.In object-oriented programming specifically, objects are specific instances, and that object may have a combination of variables, functions, or data structures inside of itself.

An easy way to describe an object is as an abstraction of a real thing. If you had a real, physical desk in front of you, you could make a desk object in the computer, it won’t be a real desk - but it will be an abstraction of a desk. If you had a photograph of somebody in your computer, that person is not in your computer, but a representation of them is.

In Programming Concepts you will be creating a zoo, this zoo will have animals, people, wallets, vending machines, ticket booths, a birthing room - all of these are abstractions of what they are in the real world. In class you will be walked through creating these objects and setting field values of the objects so they can have characteristics. Different animals will have different values associated with them to give them their uniqueness. These aspects of object-oriented programming will, in this class, always be tied back to their real world concepts.

In the Inform game there were rooms, desks, people, and a variety of other things that are all considered to be objects. The creation, manipulation and classification of objects are what will be covered in the first two weeks in this course.