Home : Course Map : Chapter 3 : Java : Tech :
Object Oriented Programing in
Science & Engineeing
JavaTech
Course Map
Chapter 3

Introduction
Class Definition
Data Fields
Methods
Constructors
Instantiation
  
Demo 1
  Demo 2
Static Members
  Demo 3

Value&Reference
  Demo 4
Overloading
   Demo 5
Wrappers 
  Demo 6
Autobox/Unbox
   Demo 7
Arrays
  Demo 8
Exceptions
Exercises

    Supplements
MoreAboutObjects
Creating Types

Classes,Objs&JVM

Java OOP vs C++
Garbage Collection
     About JavaTech
     Codes List
     Exercises
     Feedback
     References
     Resources
     Tips
     Topic Index
     Course Guide
     What's New

The same reasons that object oriented programming benefits general programming also apply to science and engineering applications. These benefits include

  • Enhanced reusability of the code.
  • Modularity makes the code structure easier to understand and maintain..
  • Encapsulation helps to reduce the breaking of other codes when a change is made.
  • Inheritance allows for enhancements of the code (see Chapter 4) in systematic manner.

OOP also provides particular benefits to science and engineering programming. Since we think of many aspects of natural phenomena as interactions among constituent parts, it follows that code objects interacting with each other will allow for a more intuitive approach to simulating and analysing natural phenomena.

Perhaps this is especially applicable to physics, as we discuss in the Chapter 3: Physics section, where theory reduces complex physical systems to their essential parts, such as fundamental particles. These parts naturally fall into object descriptions when simulating these systems in software.

Not only physics, however, but science in general usually attempts to disassemble complex systems into simpler and simpler components. Objects in simulations can represent these components in an analogous manner. You then group these simple objects into composite objects to simulate more complex systems in which the components interact.

For example, one could easily imagine a set of classes providing the properties and structures of a group of proteins. These could be useful to both chemists and microbiologists, who could use them in their own programs for different applications.

Engineers in a similar way can use objects to represent the different components that make up a complex machine or a group of machines like a power plant. Each object representing a component of an engine, for example, could act and interact like the real part.

OOP also emphasizes reusability. If a class is well designed, then it can function in many different programs. A class representing a

Inheritance (see Chapter 4: Java: Inheritance) provides also a natural way to model a modified component by replacing the class that represented the original component with an extended class that inherits the features of the old representation while adding new and modified features to represent the new component.

Latest update: Dec.15.2003

           Tech
OOP in Tech Apps
Complex Number
Histogram Class
  Demo
More Wrappers

           Physics
OOP in Physics
Particle Class
Root Finding
  Demo 1
Newton Methods
  Demo 2
Exercises

  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
21
22 23 24
Supplements

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.