[go: up one dir, main page]

Skip to content

Step by step explain concepts deeply ,proper examples with tested portions, short notes in the form of slides , external material links and much more.

License

Notifications You must be signed in to change notification settings

muhibarshad/Zero-to-Advance-OOP-Concepts-CPP

Repository files navigation


C++ Object-Oriented Programming
Comprehensive Guide and Resource

Contributors ⛓️


This repository is a comprehensive resource and guide for those looking to learn or improve their understanding of Object-Oriented Programming (OOP) in C++. It includes a wide range of materials, including slides, code examples, exercises, and blog posts, all of which are designed to help you gain a deeper understanding of OOP concepts and techniques. Whether you are a beginner just starting out with C++ or an experienced programmer looking to expand your skills, this repository has something for you. With clear explanations, detailed examples, and plenty of opportunities to practice and apply your knowledge, this is the ultimate resource for learning OOP in C++.

How to get benefit from this repository πŸ’»

If you want to learn any topic, simply choose one from the available options and start gaining knowledge from the provided resources on about that topic you choosed.

Every Topic contain these provided resources in depth

Table of Content πŸ“„

If you're interested in seeing what I can do with OOP in C++, you've come to the right place! My Github repository is full of deep dive concepts that showcase my skills and experience with object oriented design. From simple demos to interview level concepts , I hope you'll find something here that inspires you.

A langugae which containes these four core segments is referrred as Object-Oriented-Programming language.

  • Classes and object :

    Classes have no exixtence in the memeory, it's only a blueprint.When we make an object of that class, then it should having the same memeory.Class is a user defined-data-Type, called as ABSTRACT_DATA_TYPE.
  • Data Hiding and Encapsulation:

    Data hided from every another object is called data hiding. All the members of a class including data members and member functions are closed in a class like a capsule is referred to as Encapsulation. This feature opens a new term named as Abstraction which means that all the inner details are completetly ignored and we focus only on the working of the software.
  • Inheritance:

    Do not reinvent the wheel.In programming the term used as : Do not repeat the codeβ›”.Inheritance has the code reuse-ability.Some features are inherited from the base class and given to the derived class.If any language does not support the inheritance then its not calle the Object oriented programming language its called the *Object-Based-Language.
  • Polymorphism

    Define as : Single interface having multiple functionalities.(same name different behaviour). It has two types :
    • Static Function overloading is done in static polymorphism.It has be achieved on the compile time also called the compile_time_binding.
    • Dynamic Function overriding is done in the dynamic polymorphism.It has be achieved on the run time also called the Run_Time_binding.

Dynmaic Memory Allocation (DMA) πŸ“•

Dynamic memory allocation in C++ allows for the allocation of memory at runtime, rather than at compile-time. This can be done using the "new" operator, which returns a pointer to the memory allocated. Memory allocated dynamically must be freed using the "delete" operator or a smart pointer to avoid memory leaks. C++ also provides "new[]" and "delete[]" for allocating and deallocating arrays dynamically.

  1. Dynamic Arrays
  2. One Dimensional Dynamic Arrays
  3. Two Dimensional Dynamic Arrays
  4. Character Dynamic Arrays

Classes and Encapsulation πŸ“₯

In C++, classes are used to define objects and their behavior. Encapsulation is the mechanism of hiding the internal details of a class from the outside world, and only exposing a public interface. This allows for data abstraction and helps to maintain the integrity of the data by preventing unauthorized access.

  1. Classes and Static Objects
  2. Dynamic Objects and Access operator(->)
  3. Static and Dynamic Object Function Types
  4. Object Operators
  5. Setters and Getters
  6. This keyword
  7. Scope Resolution operator (::)
  8. Member Functions
  9. Constructors and Destructors
  10. Const in oop
  11. Static Keyword With Classes
  12. Shallow vs Deep copy
  13. Operators Overloading
  14. Array_Class

Relationships among classes 🀝

There are several relationships that can exist between classes in C++, including: Inheritance, Composition, Association, Aggregation and Dependency. These relationship can be represented by UML diagrams and can help to model the relationships and interactions between different classes in a program.

  1. Object Relationships

Polymorphism πŸ§‘β€πŸ€β€πŸ§‘

Polymorphism in C++ allows for objects of different classes to be treated as objects of a common base class. This is achieved through the use of virtual functions and function overloading. It enables a single function or method to operate on multiple types of data, and allows for more dynamic and extensible code.

  1. Polymorphism

Templates 🧞

Templates in C++ allow for the creation of generic functions and classes that can work with any data type. This is done by using template parameters, which are replaced by concrete types at compile time. It enables the creation of reusable and efficient code, and allows for compile-time type checking. This feature is known as template metaprogramming.

  1. Templates

Exception Handling πŸ”΄

Exception handling in C++ provides a way to handle runtime errors, such as divide by zero or accessing an out of bounds array element. It allows the program to continue execution instead of terminating abruptly. It is done by using try-catch blocks, and throw keyword is used to throw an exception when an error occurs. Exception handling makes the code more robust and maintainable, and separates the error handling code from the normal code.

  1. Exception handling

File Handling πŸ“

File handling in C++ provides a way to read from and write to files on a disk. It uses a stream-based approach, where files are treated as streams of bytes. The C++ Standard Template Library (STL) provides several classes such as ofstream, ifstream and fstream for reading, writing and manipulating files. These classes have methods to open, read, write and close the files and can handle both text and binary files.

  1. File Handling

20% OFF Extra

I'm excited to share these other resources and attached files with you! From tips and tricks to templates and tools, I hope these resources will help you boost your productivity and take your skills to the next level.

🀝 Contributing

"Feel free to contribute to this repository. If you want to add new features or resolve any issues, you can fork the repository and make changes to the code. If you only want to make changes to the file, you can create a pull request to the master branch. I will review it and, if it meets the necessary requirements, I will merge it into the branch. The same process applies for changes to the main branch as well."

Contributors ⛓️

Show your support

If this project was helpful to you, please consider giving it a ⭐️. You can also follow my GitHub profile to stay updated on my latest projects: @muhib7353

πŸ“ License

Copyright Β© 2022 Muhib Arshad.

This project is MIT licensed.

About

Step by step explain concepts deeply ,proper examples with tested portions, short notes in the form of slides , external material links and much more.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published