Difference between revisions of "Object-oriented programming"

From CS 61A Wiki
Jump to: navigation, search
[checked revision][checked revision]
(created)
 
m ({{Sufficient-class}})
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Object-oriented programming''' (OOP) is the idea of ...
+
{{Sufficient-class}}
 +
{{OOP sidebar}}
 +
'''Object-oriented programming''' (OOP) is a method of programming using [[object]]s that store/organize their own data and interact with each other via their methods. Programming languages that support OOP provide a built-in way to implement [[Data abstraction|data abstractions]], as classes correspond to abstract data types (ADTs).
  
== Motivation ==
+
== Sources ==
 
+
* http://inst.eecs.berkeley.edu/~cs61a/fa13/slides/15-Objects_6pp.pdf
== Terminology ==
+
* http://inst.eecs.berkeley.edu/~cs61a/sp14/disc/discussion06.pdf
 
+
* http://www-inst.eecs.berkeley.edu/~cs61a/sp14/slides/15_6pp.pdf
== Syntax ==
+
 
+
to override method for the class: A.method = lambda self: "test"
+
to override method for an instance: inst.method = lambda: "test"
+
 
+
== Inheritance ==
+
{{Main|Inheritance}}
+

Latest revision as of 15:01, 24 July 2014

Object-oriented programming (OOP) is a method of programming using objects that store/organize their own data and interact with each other via their methods. Programming languages that support OOP provide a built-in way to implement data abstractions, as classes correspond to abstract data types (ADTs).

Sources