Revised: Wed May 04 17:44:09 CDT 2016
This page is part of a Book titled XNA Game Studio .
Table of Contents
- Table of Contents
- Preface
-
What is OOP?
- What is object-oriented programming (OOP)?
- My answer
- An anecdotal description
- Atomic and non-atomic objects
- Your job - assemble the objects
- Objects working together
- Creating a model
- Objects must be designed and manufactured
- A class is analogous to manufacturing drawings
- A large library of classes
- Classes of your own design
- Why should you care about OOP?
- Three important concepts
- Object-oriented programming vocabulary
-
Discussion and sample code
- You can learn a lot...
- A new class definition
- The Main method
- Methods versus functions
- Definition of the Main method
- The WriteLine method
- The Console class
- The System namespace
- Members of the Console class
- The dot operator
- Namespaces
- The "using" declaration
- Not much help in this case
- Defining your own namespace
- The project file structure
- The Hello01 namespace
- The call to the ReadKey method
- Run the program
- Run my program
- Summary
- Miscellaneous
Preface
This module is one in a collection of modules designed primarily for teaching GAME 1343 Game and Simulation Programming I at Austin Community College in Austin, TX. These modules are intended tosupplement and not to replace the textbook.
An earlier module titled Getting Started provided information on how to get started programming with Microsoft's XNA Game Studio.
Viewing tip
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.
Figures
- Figure 1 . Project file structure.
Listings
What is OOP?
What is object-oriented programming (OOP)?
If you Google this question, you will get hundreds of answers. Here is one of those answers.
According to Wikipedia,
My answer
Here is my answer along with an anecdotal description. Unlike earlier programming styles, object-oriented programming is a programming style thatmimics the way most people think and work.
An OOP solution to a problem should resemble the problem, and observers of the solution should be able to recognize the problem without necessarily knowingabout it in advance.