Object-Oriented Programming

  • Hans Petter Langtangen
Part of the Texts in Computational Science and Engineering book series (TCSE, volume 6)


This chapter introduces object-oriented programming in Python, in the meaning of designing and implementing class hierarchies. Subclasses inherit data and functionality from superclasses and tailor data structures and methods to the needs in the subclasses. We present several examples on how to utilize object-oriented programming for numerical computing. There is also a more comprehensive example on object-oriented implementation of a drawing program, where recursive traversal of tree structures is illustrated.


Functional Programming Class Hierarchy Child Class Program Flow Programming Style 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Hans Petter Langtangen
    • 1
    • 2
  1. 1.Simula Research LaboratoryLysaker, FornebuNorway
  2. 2.Department of InformaticsUniversity of OsloOsloNorway

Personalised recommendations