ch13-OOPython - ObjectOrientedProgramming Python...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Object-Oriented Programming Python
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
OO Paradigm - Review Three Characteristics of OO Languages Inheritance It isn’t necessary to build every class from scratch – attributes  can be derived from other classes Polymorphism The meaning of a method attribute depends on the object’s  class/subclass Encapsulation Object behavior and object data are combined in a single  entity. Object interface defines interaction with the object; no  need to know/understand the implementation.
Background image of page 2
Polymorphism In computer science,  polymorphism  is a  programming language feature that allows  values of different data types to be handled  using a uniform interface.  http://en.wikipedia.org/wiki/Type_polymorphism ; 3/29/2010
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Types of Polymorphism Polymorphism with virtual functions is sometimes  called inclusion  polymorphism or pure  polymorphism This is the intended meaning when we say OO  programming implements polymorphism. Parametric  polymorphism comes from templates  or generic functions Overloading is a kind of ad-hoc  polymorphism
Background image of page 4
Polymorphism Polymorphism is a product of inheritance: A method’s definition is determined by the  class of the object that invokes it. By re-defining a method in a subclass (giving  it a new implementation), it is possible for a  derived class to override  the parent class  definition.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/21/2010 for the course CS 424 taught by Professor Weisskopf during the Spring '10 term at University of Alabama - Huntsville.

Page1 / 22

ch13-OOPython - ObjectOrientedProgramming Python...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online