Object oriented programming

Object oriented programming

 Also known as OOP, is a method of programming that is event-driven so instead of just going from the beginning of the code to end like  in procedural programming it goes in order in the main method until it reaches a call to another method or the creation of an object through a constructor. Java is a good example of OOP programming.

   In other words oop programming is like  a virtual world of objects and each object has its own memory and a set of methods(things it can do like send messages , process messages, change its memory or create new objects).  Each object in this world is a part of a class , which determines what the object does, what methods it has and how it’s memory is structured.

 The other important thing about oop programming other than event-driven programming is inheritance, which is where a class extends another class. So, say you made a general balloon object and then later you made a oval balloon and a square balloon, it would be a waste to duplicate the general balloons methods, instead you have oval balloon and a square balloon extend the balloon class, making them a subclass of the general balloon class meaning that they have access to all of general balloons methods. The general balloon class may be called a superclass if another class extends them.

One thought on “Object oriented programming

Comments are closed.