From e2c290bcc1a944c384f1a169ddc16b1e4efc0ec6 Mon Sep 17 00:00:00 2001
From: VerzatileDev <47317248+VerzatileDev@users.noreply.github.com>
Date: Thu, 13 Jun 2024 17:44:30 +0300
Subject: [PATCH 1/9] Fix a permalink to remove .html (#102)
The following change is based on the information provided at:
- https://jekyllrb.com/docs/permalinks/
(When a page is located at " Resource/myPage.html " it converts it to -> /myPage/ )
---
_config.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/_config.yml b/_config.yml
index 7f20454..70b3bae 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,6 +1,7 @@
title: Programming Handbook
description: An open-source platform for sharing and preserving programming knowledge. Discover code snippets, best practices, and resources, all continuously updated by a thriving community of developers. Join us to collaborate and enhance your coding skills in one comprehensive space.
theme: just-the-docs
+permalink: pretty
url: https://just-the-docs.github.io
From fd53c244ba34987c6284b20c0e735d2abcf12a05 Mon Sep 17 00:00:00 2001
From: JDSherbert <43964243+JDSherbert@users.noreply.github.com>
Date: Mon, 24 Jun 2024 21:00:52 +0100
Subject: [PATCH 2/9] Update Notepad++.md
Added article for Notepad++
---
docs/IDE/Notepad++/Notepad++.md | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/docs/IDE/Notepad++/Notepad++.md b/docs/IDE/Notepad++/Notepad++.md
index 97b8fee..82ecf16 100644
--- a/docs/IDE/Notepad++/Notepad++.md
+++ b/docs/IDE/Notepad++/Notepad++.md
@@ -1,7 +1,7 @@
---
layout: default
title: Notepad++
-description: "Warning: The following page is currently under construction, find more about the details in future patches, or if you choose to add in the article see info on the bottom of the page."
+description: An article dicussing features, key releases and getting started topics about Notepad++
nav_order: 1
parent: IDE
has_children: false
@@ -10,10 +10,19 @@ has_children: false
{{ page.title }}
======================
-{% include under_construction.html %}
-
Download: https://notepad-plus-plus.org/
-
+Notepad++ is a free and open-source text and source code editor for Windows. It is extremely lightweight and is very useful for quick code edits, psuedocoding, or note taking. Notepad++ has a wide support for a wide variety of programming languages. Itsupports syntax highlighting and folding for programming languages (e.g., C++, Python, HTML, CSS, JavaScript). The highlighting feature makes the code more readable by coloring different parts of the syntax, while folding allows users to collapse sections of code to make it easier to manage large files.
+
+It's worth knowing that Notepad++ is primarily a text editor. It does not come with built-in support for compiling or debugging code. Users will need to use external compilers and debuggers, which can be less convenient than integrated development environments (IDEs) like Visual Studio, that provide these tools out of the box. Unlike full-fledged IDEs, Notepad++ also lacks features like project management, integrated version control, and direct execution of code.
+This doesn't make it any less useful!
+
+To use notepad, simply download it from the link above, and then install it. Run it and start writing! No other nonsense involved!
+
+
+
+
+---
-
\ No newline at end of file
+#### Author: JDSherbert
+#### Published: 24/06/2024
From af607c69af089a833972591ca30edfd8aa9bcd27 Mon Sep 17 00:00:00 2001
From: JDSherbert <43964243+JDSherbert@users.noreply.github.com>
Date: Tue, 25 Jun 2024 19:21:55 +0100
Subject: [PATCH 3/9] Update Notepad++.md (#103)
Added article for Notepad++
---
docs/IDE/Notepad++/Notepad++.md | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/docs/IDE/Notepad++/Notepad++.md b/docs/IDE/Notepad++/Notepad++.md
index 97b8fee..82ecf16 100644
--- a/docs/IDE/Notepad++/Notepad++.md
+++ b/docs/IDE/Notepad++/Notepad++.md
@@ -1,7 +1,7 @@
---
layout: default
title: Notepad++
-description: "Warning: The following page is currently under construction, find more about the details in future patches, or if you choose to add in the article see info on the bottom of the page."
+description: An article dicussing features, key releases and getting started topics about Notepad++
nav_order: 1
parent: IDE
has_children: false
@@ -10,10 +10,19 @@ has_children: false
{{ page.title }}
======================
-{% include under_construction.html %}
-
Download: https://notepad-plus-plus.org/
-
+Notepad++ is a free and open-source text and source code editor for Windows. It is extremely lightweight and is very useful for quick code edits, psuedocoding, or note taking. Notepad++ has a wide support for a wide variety of programming languages. Itsupports syntax highlighting and folding for programming languages (e.g., C++, Python, HTML, CSS, JavaScript). The highlighting feature makes the code more readable by coloring different parts of the syntax, while folding allows users to collapse sections of code to make it easier to manage large files.
+
+It's worth knowing that Notepad++ is primarily a text editor. It does not come with built-in support for compiling or debugging code. Users will need to use external compilers and debuggers, which can be less convenient than integrated development environments (IDEs) like Visual Studio, that provide these tools out of the box. Unlike full-fledged IDEs, Notepad++ also lacks features like project management, integrated version control, and direct execution of code.
+This doesn't make it any less useful!
+
+To use notepad, simply download it from the link above, and then install it. Run it and start writing! No other nonsense involved!
+
+
+
+
+---
-
\ No newline at end of file
+#### Author: JDSherbert
+#### Published: 24/06/2024
From 21fe45fc7e0555b1d5c1c85a3d8945a05d3e5d65 Mon Sep 17 00:00:00 2001
From: JDSherbert <43964243+JDSherbert@users.noreply.github.com>
Date: Thu, 4 Jul 2024 00:15:39 +0100
Subject: [PATCH 4/9] Update Polymorphism.md
---
docs/Concepts/Polymorphism/Polymorphism.md | 148 ++++++++++++++++++++-
1 file changed, 143 insertions(+), 5 deletions(-)
diff --git a/docs/Concepts/Polymorphism/Polymorphism.md b/docs/Concepts/Polymorphism/Polymorphism.md
index 93b5f0e..98419c9 100644
--- a/docs/Concepts/Polymorphism/Polymorphism.md
+++ b/docs/Concepts/Polymorphism/Polymorphism.md
@@ -1,18 +1,156 @@
---
layout: default
title: Polymorphism
-description: "Warning: The following page is currently under construction, find more about the details in future patches, or if you choose to add in the article see info on the bottom of the page."
+description: An article dicussing "Polymorphism", which means "Many Forms".
nav_order: 1
-parent: Concepts
+parent: Polymorphism
+grand_parent: Concepts
has_children: false
---
{{ page.title }}
======================
-{% include under_construction.html %}
+{: .warning }
+This article is quite advanced and assumes you have an understanding of Object Oriented Programming.
+If not, please refer to the [C++](/docs/Concepts/OOP/OOP.md) section of this book!
+Polymorphism is a fundamental concept in object-oriented programming (OOP) that allows objects of different classes to be treated as objects of a common superclass. It enables a single interface to be used for entities of different types, promoting flexibility, extensibility, and code reuse. Polymorphism can be achieved through two main mechanisms: compile-time (or static) polymorphism and run-time (or dynamic) polymorphism.
-
+### 1. Compile-Time Polymorphism
+Compile-time polymorphism is achieved using function overloading and operator overloading.
-
\ No newline at end of file
+#### Function Overloading:
+This allows multiple functions with the same name but different parameter lists to be defined within the same scope. The appropriate function to call is determined by the number and types of arguments passed to it at compile-time.
+
+{: .code }
+```
+cpp
+// Example of function overloading
+int Add(int A, int B)
+{
+ return A + B;
+}
+
+float Add(float A, float B)
+{
+ return A + B;
+}
+```
+In this example, `Add` is overloaded to accept both `int` and `float` arguments.
+
+#### Operator Overloading:
+Operators such as `+`, `-`, `*`, etc., can be overloaded to work with user-defined types in addition to their built-in functionality.
+
+{: .code }
+```
+cpp
+// Example of operator overloading
+class Complex
+{
+
+private:
+ float A;
+ float B;
+
+public:
+
+ Complex operator+(const Complex& other)
+ {
+ Complex temp;
+ temp.A = this->A + other.A;
+ temp.B = this->B + other.B;
+ return temp;
+ }
+};
+```
+
+Here, the `+` operator is overloaded to add two "Complex" objects.
+
+### 2. Run-Time Polymorphism
+Run-time polymorphism in C++ is achieved through virtual functions and abstract classes (interfaces) using inheritance.
+
+#### Virtual Functions:
+A virtual function is a member function in a base class that you expect to override in derived classes. When you refer to a derived class object using a pointer or reference to the base class, you can call a virtual function for that object and execute the derived class's version of the function.
+
+{: .code }
+```
+cpp
+// Example of virtual functions
+class Animal
+{
+
+public:
+
+ virtual void MakeSound()
+ {
+ cout << "Animal sound" << endl;
+ }
+};
+
+class Dog : public Animal
+{
+
+public:
+
+ void MakeSound() override
+ {
+ cout << "Bark!" << endl;
+ }
+};
+```
+In this example, `MakeSound()` is a virtual function in `Animal` which is overridden in `Dog`.
+
+#### Abstract Classes and Pure Virtual Functions:
+An abstract class is a class that has at least one pure virtual function. A pure virtual function is a virtual function that is declared in a base class but has no definition. Abstract classes cannot be instantiated; they are meant to be inherited from by other classes.
+
+{: .code }
+```
+cpp
+// Example of abstract class and pure virtual function
+class Shape
+{
+
+public:
+
+ virtual void Draw() = 0; // Pure virtual function
+ virtual float Area() const = 0; // Another pure virtual function
+};
+
+class Circle : public Shape
+{
+
+public:
+
+ void Draw() override
+ {
+ cout << "Drawing Circle" << endl;
+ }
+
+ float Area() const override
+ {
+ return 3.14 * radius * radius;
+ }
+
+private:
+
+ float Radius;
+};
+```
+Here, `Shape` is an abstract class with pure virtual functions `Draw()` and `Area()`. `Circle` inherits from `Shape` and provides implementations for these functions.
+
+### Benefits of Polymorphism
+- Flexibility and Extensibility: Code written using polymorphism can be easily extended by adding new classes that implement the same interfaces or inherit from the same base class.
+- Simplicity and Maintainability: Polymorphism allows for cleaner and more modular code since it encourages reusability and reduces duplication.
+- Encapsulation: By using polymorphism, you can hide the implementation details of classes and expose only the required functionality through interfaces.
+
+### Considerations and Best Practices
+- Use Interfaces When Appropriate. If you want to define a common interface without any implementation details, use abstract classes (interfaces) with pure virtual functions.
+- Avoid Slicing: When working with polymorphic objects through pointers or references to the base class, be mindful of object slicing, where the derived class's specific attributes can be lost if assigned to a base class object.
+
+Polymorphism is a powerful concept that enables elegant and efficient design of object-oriented systems. It promotes code reusability, maintainability, and flexibility, making it a cornerstone of modern software development practices.
+
+---
+
+#### Author: JDSherbert
+#### Published: 04/07/2024
From 38defa10cf940e03b388b032d71fccb9ee9fcc06 Mon Sep 17 00:00:00 2001
From: JDSherbert <43964243+JDSherbert@users.noreply.github.com>
Date: Thu, 4 Jul 2024 00:16:04 +0100
Subject: [PATCH 5/9] Update Polymorphism.md
---
docs/Concepts/Polymorphism/Polymorphism.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/Concepts/Polymorphism/Polymorphism.md b/docs/Concepts/Polymorphism/Polymorphism.md
index 98419c9..9f7dd90 100644
--- a/docs/Concepts/Polymorphism/Polymorphism.md
+++ b/docs/Concepts/Polymorphism/Polymorphism.md
@@ -13,7 +13,7 @@ has_children: false
{: .warning }
This article is quite advanced and assumes you have an understanding of Object Oriented Programming.
-If not, please refer to the [C++](/docs/Concepts/OOP/OOP.md) section of this book!
+If not, please refer to the [OOP](/docs/Concepts/OOP/OOP.md) section of this book!
Polymorphism is a fundamental concept in object-oriented programming (OOP) that allows objects of different classes to be treated as objects of a common superclass. It enables a single interface to be used for entities of different types, promoting flexibility, extensibility, and code reuse. Polymorphism can be achieved through two main mechanisms: compile-time (or static) polymorphism and run-time (or dynamic) polymorphism.
From 93e4099d1f0ebb4f793d0d92bf79b60c6c420c0b Mon Sep 17 00:00:00 2001
From: JDSherbert <43964243+JDSherbert@users.noreply.github.com>
Date: Thu, 4 Jul 2024 00:34:46 +0100
Subject: [PATCH 6/9] Update OOP.md
---
docs/Concepts/OOP/OOP.md | 259 ++++++++++++++++++++++++++++++++++++---
1 file changed, 239 insertions(+), 20 deletions(-)
diff --git a/docs/Concepts/OOP/OOP.md b/docs/Concepts/OOP/OOP.md
index 9796eeb..09d8e85 100644
--- a/docs/Concepts/OOP/OOP.md
+++ b/docs/Concepts/OOP/OOP.md
@@ -1,33 +1,252 @@
---
layout: default
-title: OOP
-description: "Warning: The following page is currently under construction, find more about the details in future patches, or if you choose to add in the article see info on the bottom of the page."
+title: OOOP
+description: An article dicussing Object Oriented Programming.
nav_order: 1
-parent: Concepts
+parent: OOP
+grand_parent: Concepts
has_children: false
-include_programming_language_switch_script: true
---
{{ page.title }}
======================
-{% include under_construction.html %}
+Object-Oriented Programming (OOP) is a programming paradigm that revolves around the concept of objects, which are instances of classes, and allows for the organization and structure of code that is more closely aligned with real-world entities and concepts. OOP provides a way to structure software as a collection of objects that interact with each other to accomplish tasks. Here’s an in-depth exploration of the key principles and concepts of OOP:
-