Computer World. Матросова Т.А. - 98 стр.

UptoLike

Составители: 

97
TEXT 9
OBJECT-ORIENTED PROGRAMMI NG WI TH JAVA
Object-oriented programming (OOP) is a programming paradigm that is
fundamentally different from traditional procedural programming styles. It is
centered around the concept of objects-programming constructs that have both
properties and the procedures for manipulating those properties. This approach
models the real world much more closely than conventional programming methods
and is ideal for the simulation-type problems commonly encountered in games.
You're probably already aware that Java is an object-oriented language, but you
might not fully understand what that means. To successfully use Java to write
Internet games, you need to embrace object-oriented programming techniques and
design philosophies. The goal of today's lesson is to present the conceptual aspects of
object-oriented programming as they relate to Java. By the end of today's lesson, you
will fully understand what OOP means to Java and maybe even have some new buzz
words to share with your friends! More important, you will gain some insight into
why the OOP paradigm built into Java is a perfect match for game programming.
The following topics are covered:
What is OOP?
OOP and games
Java and other OOP languages
What Is OOP?
If you've been anywhere near the computer section of a bookstore or picked up a
programming magazine in the last five years, you've certainly seen the hype
surrounding object-oriented programming. It's the most popular programming
technology to come about in a long time, and it all revolves around the concept of an
object. The advent of Java has only served to elevate the hype surrounding OOP. You
might wonder what the big deal is with objects and object-oriented technology? Is it
something you should be concerned with, and if so, why? Is it really that crucial
when working with Java? If you sift through the hype surrounding the whole object-
oriented issue, you'll find a very powerful technology that provides a lot of benefits to
software design.
But the question still remains: What is OOP? OOP is an approach to
programming that attempts to bridge the gap between problems in the real world and
solutions in the computer programming world. Prior to OOP, a conceptual stumbling
block always existed for programmers when trying to adapt the real world into the
constraints imposed by a traditional programming language. In the real world, people
tend to think in terms of «things,» but in the pre-OOP programming world people
have been taught to think in terms of blocks of code (procedures) and how they act on
data. These two modes of thinking are very different from each other and pose a
significant problem when it comes to designing complex systems that model the real
world. Games happen to be very good examples of complex systems that often model
the real world.