Java Reference
In-Depth Information
stage is the process of actually writing the program. Too often programming is
thought of as writing code. But in most cases, the act of designing the program
should be far more interesting and creative than the process of implementing the
design in a particular programming language.
At many points in the development process, we should test our solution to find
any errors that exist so that we can fix them. Testing cannot guarantee that there
aren't still problems yet to be discovered, but it can raise our confidence that we
have a viable solution.
Throughout this text we explore techniques that allow us to design and imple-
ment elegant programs. Although we will often get immersed in these details, we
should never forget that our primary goal is to solve problems.
Object-Oriented Software Principles
Object-oriented programming ultimately requires a solid understanding of the
following terms:
object
attribute
method
class
encapsulation
inheritance
polymorphism
In addition to these terms, there are many associated concepts that allow us
to tailor our solutions in innumerable ways. This topic is designed to help you
evolve your understanding of these concepts gradually and naturally. This section
provides an overview of these ideas at a high level to establish some terminology
and provide the big picture.
We mentioned earlier that an object is a fundamental element in a program. A
software object often represents a real object in our problem domain, such as a
bank account. Every object has a state and a set of behaviors. By “state” we mean
state of being—fundamental characteristics that currently define the object. For
example, part of a bank account's state is its current balance. The behaviors of
an object are the activities associated with the object. Behaviors associated with
a bank account probably include the ability to make deposits and withdrawals.
In addition to objects, a Java program also manages primitive data. Primitive
data includes fundamental values such as numbers and characters. Objects usually
represent more interesting or complex entities.
 
Search WWH ::




Custom Search