1 / 6

Object Oriented Programming

Object Oriented Programming. Procedural Programming. Pros Main control code block that calls functions Custom functions written to solve each problem Any data can be passed into any function Fast Low memory usage. Procedural Programming. Cons Function libraries can get very large

arissa
Download Presentation

Object Oriented Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Object Oriented Programming

  2. Procedural Programming • Pros • Main control code block that calls functions • Custom functions written to solve each problem • Any data can be passed into any function • Fast • Low memory usage

  3. Procedural Programming • Cons • Function libraries can get very large • You cannot reuse functions for other problems without reworking them • Data can be changed inadvertently • The code is difficult to maintain • Changes to a function can introduce bugs in other sections of code

  4. Object Oriented Programming • Cons • More complicated design • Uses more memory • Code can be slower to run

  5. Terms to know • Object • A unit containing data and functions to operate on that data • Class • Defines what data and functions an object will have

  6. More Terms (the pros) • Abstraction • Hides the data inside the class, and provides controlled access through functions • Encapsulation • Having data and functions together in the same object • Inheritance • Reusability, lets you make small changes to classes easily • Polymorphism • Using the same function for different types of data (overloading)

More Related