1 / 6

A quick overview of an Object

A quick overview of an Object. Anthony Lomax Anthony Lomax Scientific Software Mouans-Sartoux, France anthony@alomax.net www.alomax.net. data methods. object. restricted access. messages. /** A basic Seismogram object */

vian
Download Presentation

A quick overview of an Object

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A quick overview of an Object Anthony Lomax Anthony Lomax Scientific Software Mouans-Sartoux, France anthony@alomax.netwww.alomax.net

  2. data methods object restricted access messages

  3. /** A basic Seismogram object */ public class BasicSeismogram extends BasicThing { public BasicChannel channel; // channel info protected TimeSeries timeSeries; // seismogram data protected DateTime refTime; // reference time private double timeMin;// offset of 1st sample /** Returns the reference time. */ public DateTime getRefTime() { return(refTime); } /** Returns the amplitude at a given offset time. */ public double ampAtTime(double time) { int nsample = (int) (time - timeMin) / (double) timeSeries.getSampleInt(); amp = (double) timeSeries.sampleAt(nsample + 1); return(amp); } } // end class BasicSeismogram data “Inheritance” “Encapsulation” “Protection” object (class) methods

  4. data methods interfacedclasses “implements” inherited classes “extends” “Polymorphism” data methods data methods object methods restricted access messages

  5. extends implements data methods GradientVelocityModel Drawable Geometry3D Volume TravelTime Calculator VelocityModel

  6. A quick overview of an Object References General: Developer.com - http://developer.com O'Reilly Network - http://www.oreillynet.com P. Andrews, Object Lessons: the State of the Art - http://www.developer.com/design/article.php/1439571 Scientific: Seismological: Anthony Lomax Scientific Software, Mouans-Sartoux, France anthony@alomax.netwww.alomax.net

More Related