Global Positioning System Reference
In-Depth Information
What does modeling of real-world objects actually mean? What is real?
The \methods" of physical objects can be expressed in mathematical
formulas. Just like the scientist, the object-oriented programmer is using
techniques to abstract details to understand the behavior of objects, or
things. Reproducible behavior indicates a physical law. Physics describe
real-world behavior in the language of mathematics. Formulas describe how
objects behave. These fundamental laws are independent of programming
languages and chosen units (i.e., miles or kilometers).
Why not transfer the entire scientific knowledge into software objects?
If the idea of software objects is derived from real-world objects, wouldn't
it be the ultimate test of object-oriented software to build a real-world
simulator?
Can software objects be programmed to behave like physical
objects?
This all sounds like a nice blueprint to create some objects and fill them
with mathematical formulas. The testing could be done by comparing
simulations with the real world. And in the end: How can you tell the
difference between the virtual and the real world? By finding the difference!
Mother nature as the project manager should help to minimize discussions!
1.4.1
Object-Oriented Simulations
This topic will not deal with physical formulas. Nevertheless, the idea to
build a real-world simulator cannot ignore physical formulas that actually
describe the real world in terms of mathematics. In this section, we take
a little excursion into a discussion of physical laws, i.e., the law of gravity
and how it can be applied to create a tiny real-world simulation with a
single class. This class roaf.book.intro.MassObject can be downloaded at
www.roaf.de , where you can also read about how mathematical equations
book.intro.MassObject are derived from physical laws and finally implemented into a software
simulation. This section superficially illustrates the relationship between
physical concepts and object-oriented programming.
Gravity describes the force attracting masses to each other, and the for-
mula only requires the mass of the participating objects and the distances
between them to calculate the acceleration in space.
Please follow the download and installation instructions in the
Appendix to install the roaf.book packages, which describe the code
used in the first ten chapters. Once you have the packages installed,
please execute the method roaf.book.intro.MassObject.main .
Search WWH ::




Custom Search