Java Reference
In-Depth Information
Although this might sound daunting if you are unfamiliar with this style of program-
ming, think of it as a two-for-one discount for your brain. You will learn object-oriented
programming by learning Java. There's no other way to make use of the language.
Object-oriented programming is an approach to building computer programs that mimics
how objects are assembled in the physical world.
1
By using this style of development, you can create programs that are more reusable, reli-
able, and understandable.
To get to that point, you first must explore how Java embodies the principles of object-
oriented programming. The following topics are covered during the first week of this
book:
Organizing programs into elements called classes
n
Learning how these classes are used to create objects
n
Defining a class by two aspects of its structure: how it should behave and what its
attributes are
n
Connecting classes to each other in a way that one class inherits functionality from
another class
n
Linking classes together through packages and interfaces
n
If you already are familiar with object-oriented programming, much of today's material
will be a review for you. Even if you skim over the introductory material, you should
create the sample program to get some experience developing, compiling, and running
Java programs.
There are many different ways to conceptualize a computer program. One way is to think
of a program as a series of instructions carried out in sequence, and this is commonly
called procedural programming . Many programmers start by learning a procedural lan-
guage such as a version of BASIC.
Procedural languages mirror the way a computer carries out instructions, so the programs
you write are tailored to the computer's manner of doing things. One of the first things a
procedural programmer must learn is how to break down a problem into a series of sim-
ple steps.
Object-oriented programming looks at a computer program from a different angle, focus-
ing on the task for which you are using the computer rather than the way a computer
handles tasks.
Search WWH ::




Custom Search