Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript

Object Oriented Programming

Procedural Programming

  • Linear Programming
  • Programs are built on series of instructions
  • Block based instructions

FOUNDATION

  • Functions are accessed via blocks and be called in a global scope
  • SPAGHETTI CODE

OBJECT ORIENTED PROGRAMMING

  • Makes use of "Objects"
  • Makes the programming structure more efficient by making use of the concept of objects

WHAT?

  • Greatly changed how most applications are developed and maintained in many fields.
  • Probably makes uses of an initial strucure or template known as "Class"
  • SO WHAT ARE THESE OBJECTS?

OBJECT

  • variables within objects are called properties
  • functions within objects are called methods

CONCEPT EXAMPLE

Social Media Account

What does a social media account have?

OBJECTS

EmailAddress

Properties

UserName

PassWord

What does a social media account do?

SendMessage()

Methods

RecieveMessage()

Post()

Going throug the code

  • Set your blue print/ template (CLASS)
  • Set your initial constructor for initial properties.
  • Identify common properties and methods which can be shared amongst the objects.
  • Setup your individual objects afterwards.

Example Scenario

HOW

Assume we'll set up a character profile for a game similar with ragnarok or dungeons and dragons.

Characters share the same stats such as hp,mp, str,agi, int but may vary in skills since some characters differ in job or class.

How will we set this up?

4 Pillars of OOP

  • Encapsulation

Adds a restriction layer by limiting accessible properties and methods via only be able to access it within the object or class.

  • Abstraction

Controls access by hiding implementations on your object/class and only providing basic functionalities such as output.

  • Inheritance

WHY?

Allows multiple objects to access similar or related properties or methods from another object or class.

  • Polymorphism

Allows accessible methods to be overriden by allowing other objects to modify existing methods of an inherrited class.

Summary

using OOP will allow the code to become more efficient, thus making it more convenient for collaboration.

Code structure will become more reusable and maintanable given objects.

SUMMARY

Modularization/ separation of concern for the development structure.

Easier deployment and implementation.

Learn more about creating dynamic, engaging presentations with Prezi