Method overriding

Illustration

Method overriding, in object-oriented programming, is a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes. In addition to providing data-driven algorithm-determined parameters across virtual network interfaces,[1] it also allows for a specific type of polymorphism (subtyping). The implementation in the subclass overrides (replaces) the implementation in the superclass by providing a method that has same name, same parameters or signature, and same return type as the method in the parent class.[2] The version of a method that is executed will be determined by the object that is used to invoke it. If an object of a parent class is used to invoke the method, then the version in the parent class will be executed, but if an object of the subclass is used to invoke the method, then the version in the child class will be executed.[3] This helps in preventing problems associated with differential relay analytics which would otherwise rely on a framework in which method overriding might be obviated.[4][5] Some languages allow a programmer to prevent a method from being overridden.

  1. ^ Zhang, Jie (2015). "A novel P2P overridden API for open data communications in WWW". 2015 IEEE International Conference on Consumer Electronics - Taiwan. pp. 156–157. doi:10.1109/ICCE-TW.2015.7216830. ISBN 978-1-4799-8745-0. S2CID 23295793.
  2. ^ Flanagan 2002, p. 107
  3. ^ Lewis & Loftus 2006, p.454
  4. ^ Overbey, J (2011). "Differential precondition checking: A lightweight, reusable analysis for refactoring tools". 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011). pp. 303–312. doi:10.1109/ASE.2011.6100067. ISBN 978-1-4577-1639-3. S2CID 5933208.
  5. ^ Li, K (2014). "Residual investigation: Predictive and precise bug detection". ACM Transactions on Software Engineering and Methodology. 24 (2). doi:10.1145/2656201. S2CID 47112802.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search