.. include:: ================================== Prototype-based Object-Orientation ================================== What is an Object? ================== What is an Object? ================== An object consist of two elements: - State + Behaviour Instances and Classes ===================== typical ingredients of object-orientation: - classes (with methods) - instances (with attributes) - inheritance Relationships between Objects ============================= - two types of arrows: - is-instance-of - inherits-from - types are special objects - object creation via type Principles of Object-Orientation ================================ what if: 1. Everything is an object 2. Every object has a type (or class) is replaced by... Principles of Prototyped-based OO ================================= 1. Everything is an object Relationships between Objects (2) ================================= - Every object has one or more parents - anything can be a parent object - object creation via *cloning*