MATLS 1M03 Lecture 9: 09 classes (1)
Document Summary
Developed the idea of modular design and information hiding. An object is a mutable, active value that combines data and operatins. An object data is a set of variable called field. Each object is an instance of a class. A method in a class definition is a function definition. __init__ method : define the fields of an object, initialize the fields of an object, called the constructor for a class. Polymorphism: is when a method is applied to object of different classes. Inheritance: new class defined by extending an old class. Message passing: when objects communicate by calling each other"s methods. Information hiding: implementation details are hidden inside the object. Encapsulation: data and operators that work together are bundled.