This document contains comprehensive notes from Lecture 14 of the CO2401 course on Software Development. The lecture introduces and explores the fundamental concepts of Object-Oriented Programming (OOP), a programming paradigm that organizes code around objects representing real-world entities or c...
Introduction to Object-Oriented Programming (OOP)
1. OOP Overview
o Object-Oriented Programming (OOP): A programming paradigm
that organizes code around objects, which represent real-world
entities or concepts.
o Objects: Instances created based on the blueprint provided by
classes.
o Classes: Define the attributes (data) and methods (functions) that
objects will have.
Recap: Principles of OOP
1. Four Pillars of OOP:
o Abstraction: Modeling real-world objects in a specific context,
representing only the relevant details with high accuracy while
omitting the irrelevant ones.
o Encapsulation: Hiding parts of an object's state and behavior from
other objects, exposing only a limited interface to the rest of the
program.
o Inheritance: Building new classes on top of existing ones, enabling
code reuse.
o Polymorphism: The ability of a program to detect the real class of
an object and call its implementation, even when its real type is
unknown in the current context.
What is a Design Pattern?
1. Definition:
o Design Patterns: Typical solutions to commonly occurring
problems in software design. They provide a high-level description
of a solution to a problem, rather than a step-by-step algorithm.
o Difference from Algorithms: While algorithms define a clear set
of actions to achieve a specific goal, patterns offer a more abstract
solution to a problem.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller BpoBpo. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £3.48. You're not tied to anything after your purchase.