1 / 10

CSE 2341 Object Oriented Programming with C++ Note Set #4

CSE 2341 Object Oriented Programming with C++ Note Set #4. Quick Look. Procedural/structures vs. OOP First Class. Procedural vs OOP. Procedural focused on procedures that take place in a program data is secondary to functionality Object Oriented Programming (OOP)

Download Presentation

CSE 2341 Object Oriented Programming with C++ Note Set #4

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. CSE 2341Object Oriented Programming with C++Note Set #4

  2. Quick Look • Procedural/structures vs. OOP • First Class

  3. Procedural vs OOP • Procedural • focused on procedures that take place in a program • data is secondary to functionality • Object Oriented Programming (OOP) • concerned with understanding the objects involved in a problem and how they interact.

  4. Problems with Procedural Programming • excessive global data • larger solutions are complex and convoluted • can be very difficult to understand, modify, and extend

  5. OOP • focuses on the objects and their interaction based on the problem domain • packages together the data and methods to operate on that data • sometimes called attributes and behavior

  6. Concept Create a Point class that represents a point in 2D space Point int x int y getX() setX(newX) interface distance(anotherPoint) Private Data and Methods to operate on that data

  7. Objects • Range of possibilities is limited by programmers imagination • Usually very specific or very general • general purpose: Vector class, some datatype not part of language such as date, GUI objects • specific purpose: objects created for a specific application domain such as inventory

  8. Benefits of OOP • Data abstraction • details of classes only visible to its methods • Compatibility • easier to combine software components • Flexibility • classes provide units for task allocation

  9. Benefits of OOP • Reuse • easier to develop reusable software • Extensibility • inheritance allows new classes to be built from old ones • Maintenance • The natural modularity of the class structures makes it easier to contain the effects of change

  10. Fini ?

More Related