0% found this document useful (0 votes)
1K views3 pages

Unit I OOP Notes

msbte k scheme oop unit 1 notes

Uploaded by

patilaadesh04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views3 pages

Unit I OOP Notes

msbte k scheme oop unit 1 notes

Uploaded by

patilaadesh04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Unit I: Principles of Object-Oriented Programming

1.1 Procedure-Oriented Programming (POP) vs Object-Oriented Programming (OOP)

-----------------------------------------------------------------------------

| Aspect | POP | OOP |

|---------------------|------------------------------|------------------------------|

| Approach | Focuses on functions. | Focuses on objects/classes. |

| Data Access | Globally accessible. | Encapsulated in objects. |

| Security | Less secure. | More secure. |

| Examples | C, Fortran. | C++, Java, Python. |

1.2 Features of Object-Oriented Programming (OOP)

--------------------------------------------------

- Encapsulation: Wrapping data and functions into a class.

- Abstraction: Hiding implementation details.

- Inheritance: Reusing existing classes.

- Polymorphism: Same operation behaving differently.

- Dynamic Binding: Runtime execution depends on conditions.

- Message Passing: Communication via methods.

Examples: C++, Java, Python

Applications: Game Development, GUI-Based Applications, Web Development.

1.3 Data Types in C++

---------------------

- Basic: int, float, char, etc.


- Derived: Arrays, Pointers.

- User-Defined: struct, class.

Dynamic Initialization:

-----------------------

int x = 5, y = 10;

int sum = x + y; // Initialized dynamically

Reference Variables:

-------------------

int a = 10;

int &ref = a;

1.4 Special Operators in C++

----------------------------

- Scope Resolution Operator (::): Used to access global variables.

- Memory Management Operators: `new`, `delete`.

- Manipulators: Formatting output (e.g., endl, setw).

1.5 Structure of a C++ Program

------------------------------

#include <iostream>

using namespace std;

int main() {

cout << "Hello, World!";

return 0;
}

1.6 Class & Object

------------------

Classes are blueprints. Objects are instances.

Example:

class Car {

public:

string brand;

};

Car myCar;

myCar.brand = "Tesla";

You might also like