Home Year 7 Year 8 Year 9 GCSE A-Level

MR MAKEPEACE.NET

Object oriented     programming

Python is an object-oriented programming language. That means it provides features that support object-oriented programming (OOP).


Object-oriented programming has its roots in the 1960s, but it wasn’t until the mid 1980s that it became the main programming paradigm used in the creation of new software. It was developed as a way to handle the rapidly increasing size and complexity of software systems and to make it easier to modify these large and complex systems over time.


Up to now, some of the programs we have been writing use a procedural programming paradigm. In procedural programming the focus is on writing functions or procedures which operate on data. In object-oriented programming the focus is on the creation of objects which contain both data and functionality together. Usually, each object definition corresponds to some object or concept in the real world and the functions that operate on that object correspond to the ways real-world objects interact.

Classes and Objects Text Game with enemy











House program

Make a class house

The house class should have some data about it stored (colour, number of people living there)

Make a functions that reduce and add to  the number of people living there

Make a function that says if it is for sale (the house is empty) this could be extended by drawing the house on a graphic window


Other important oop concepts

Init blud










Class vs instance











Inheritance