Revised: Fri Oct 16 23:13:29 CDT 2015
This page is included in the following books:
Table of contents
- Preface
- Preview
-
Discussion and sample code
- Testing the plotting program
- Using the plotting program
- The class named Graph01Demo
- The class named Dsp002
- The class named Convolve01
- The discrete Fourier transform
- Two plotting programs
-
The program named Graph01
- Some general comments
- The class named Graph01
- Beginning of the class named GUI
- Beginning of the constructor for the GUI class
- Array to hold Canvas objects
- Routine GUI construction code
- The Canvas objects
- More routine construction code
- Force a repaint
- End of the constructor
- Re-plotting the data
- A new object of the target class
- The remainder of the event handler
- Beginning of the class named MyCanvas
- Beginning of the overridden paint method
- Get old coordinate values
- Plot the points
- The drawAxes method
- Drawing tic marks
- The getTheX and getTheY methods
- The test class named junk
- The program named Graph02
- Run the program
- Summary
- Complete program listings
- Miscellaneous
Preface
Excellent language for engineering computations
Because of its platform independence, Java provides an excellent programming language for engineering and scientific computational experiments, particularlywhere extreme execution speed is not a requirement. Programs developed for such experiments on one platform can be successfully executed on a variety ofplatforms without the need to rewrite or recompile the program code.
A large Math library
Furthermore, because if its inherent simplicity, and the availability of a large Math library, Java provides an excellent programming language forengineers and scientists who want to do their own programming, but who have no desire to become programming experts. The code required to conduct anengineering or scientific computational experiment often consists of little more than the most rudimentary application of arithmetic in loops using data storedin arrays or read from disk files.
Now for the bad news
However, there is a downside to this happy story. When doing this sort of work, it is often very important to see the results of the experiments in theform of graphs or plots. Unfortunately, the programming required to produce graphical output from simple engineering and scientific computationalexperiments cannot be accomplished using rudimentary programming techniques. Rather, to do that job right requires considerable expertise in Javaprogramming.