190R6 OOP Object Oriented Programming (190/6R)

Object Orientated programming is a method of working with data. It incorporatedĀ  these concepts:

  1. Abstraction
  2. Encapsulation
  3. Inheritance
  4. Polymorphism

 

 

For example, programming chess pieces

Practical example of programming in Python

Ex: ProgrammingEx: OOP Objects

Try someĀ examples for yourself (W3Schools)

Python

  1. Classes
    Note: Python uses tabs/indents to bracket
  2. Python Objects TEST*

Javascript

  1. Examples of Objects
  2. Examples of Methods

In the first video we looked at objects, properties and functions

Think of some other examples where this concept might be useful
eg people, shopping, game sprite

  1. what would the properties be?
  2. what would the methods be?