Difference between revisions of "Object-oriented programming"

From CS 61A Wiki
Jump to: navigation, search
[checked revision][checked revision]
(created)
 
(definition)
Line 1: Line 1:
'''Object-oriented programming''' (OOP) is the idea of ...
+
'''Object-oriented programming''' (OOP) is a method for bundling together information and related behavior.
  
 
== Motivation ==
 
== Motivation ==

Revision as of 15:27, 6 July 2014

Object-oriented programming (OOP) is a method for bundling together information and related behavior.

Motivation

Terminology

Syntax

to override method for the class: A.method = lambda self: "test" to override method for an instance: inst.method = lambda: "test"

Inheritance

Main article: Inheritance