<< Chapter < Page | Chapter >> Page > |
An earlier module titled Getting Started provided information on howto get started programming with Microsoft's XNA Game Studio.
Object-oriented programs exhibit three main characteristics:
In this and the next two modules, I will explain and illustrate those three characteristics plus some related topics.
I recommend that you open another copy of this module in a separate browser window and use the following links to easily find and view the Figuresand Listings while you are reading about them.
In addition to the three explicit characteristics of encapsulation, inheritance, and polymorphism, an object-oriented program also has an implicitcharacteristic of abstraction .
Abstraction is the process by which we specify a new data type, often referred to as an abstract data type or ADT. This includes a specification ofthe type's data representation and its behavior. In particular,
Encapsulation is the process of gathering an ADT's data representation and behavior into one encapsulated entity. In other words, encapsulation convertsfrom the abstract to the concrete .
You might think of this as being similar to converting an idea for an invention into a set of blueprints from which it can be built, or converting aset of written specifications for a widget into a set of drawings that can be used by the machine shop to build the widget.
Automotive engineers encapsulated the specifications for the steering mechanism of my car into a set of manufacturing drawings. Then manufacturingpersonnel used those drawings to produce an object where they exposed the interface (steering wheel) and hid the implementation (levers, bolts, etc.).
In all likelihood, the steering mechanism contains a number of other more-specialized embedded objects, each of which has state and behavior and eachof which also has an interface and an implementation.
The interfaces for those embedded objects aren't exposed to me, but they are exposed to the other parts of the steering mechanism that use them.
Notification Switch
Would you like to follow the 'Xna game studio' conversation and receive update notifications?