From 07f7a0b6968867a8c6248ed2d4cd6feb20748a56 Mon Sep 17 00:00:00 2001 From: syedmouaazfarrukh Date: Sun, 22 Jan 2023 03:24:51 -0800 Subject: [PATCH] Adding content to 101-paradigm-features --- .../100-abstract-classes.md | 10 ++++++++- .../101-concrete-classes.md | 11 +++++++++- .../102-scope-visibility.md | 14 ++++++++++++- .../101-paradigm-features/103-interfaces.md | 10 ++++++++- .../101-paradigm-features/index.md | 21 ++++++++++++++++++- 5 files changed, 61 insertions(+), 5 deletions(-) diff --git a/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/100-abstract-classes.md b/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/100-abstract-classes.md index afa58dfc0..778efa485 100644 --- a/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/100-abstract-classes.md +++ b/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/100-abstract-classes.md @@ -1 +1,9 @@ -# Abstract classes \ No newline at end of file +# Abstract Classes + +An abstract class is a class in object-oriented programming (OOP) that cannot be instantiated. Instead, it serves as a template or blueprint for other classes to inherit from. An abstract class can contain both abstract and non-abstract methods (abstract methods are methods that do not have any implementation, they just have a signature). + +Abstract classes are used to provide a common interface and implementation for a group of related classes. They are also used to define common behavior that must be implemented by all subclasses. A subclass that inherits from an abstract class is called a concrete class, and it must provide an implementation for all the abstract methods declared in the parent class. + +Learn more from the following resources: + +- [What is an Abstract Class in Object Oriented Programming](https://computinglearner.com/abstract-class-in-object-oriented-programming/) \ No newline at end of file diff --git a/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/101-concrete-classes.md b/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/101-concrete-classes.md index 7597a06d6..78ae9d945 100644 --- a/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/101-concrete-classes.md +++ b/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/101-concrete-classes.md @@ -1 +1,10 @@ -# Concrete classes \ No newline at end of file +# Concrete Classes + +A concrete class is a class in object-oriented programming (OOP) that can be instantiated, meaning objects can be created from it. A concrete class is a class that provides an implementation for all of the abstract methods declared in its parent class, if it inherits from an abstract class. A concrete class can also be a class that does not inherit from an abstract class, in that case it can have implementation for all of its methods. + +Concrete classes are used to provide specific implementation details for a group of related classes that inherit from a common abstract class. They are also used to define unique behavior for a specific class. A concrete class can have its own methods and variables, and can also override the methods of its parent class. + +Learn more from the following resources: + +- [Concrete class in Java](https://www.geeksforgeeks.org/concrete-class-in-java/) +- [Overview of Concrete Class](https://www.sciencedirect.com/topics/computer-science/concrete-class) \ No newline at end of file diff --git a/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/102-scope-visibility.md b/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/102-scope-visibility.md index de1241481..e991edbdd 100644 --- a/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/102-scope-visibility.md +++ b/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/102-scope-visibility.md @@ -1 +1,13 @@ -# Scope visibility \ No newline at end of file +# Scope Visibility + +Scope visibility refers to the accessibility or visibility of variables, functions, and other elements in a program, depending on the context in which they are defined. In object-oriented programming (OOP), scope visibility is controlled through the use of access modifiers, such as "public," "private," and "protected." + +- Public: A public element can be accessed from anywhere in the program, both within the class and outside of it. +- Private: A private element can only be accessed within the class in which it is defined. It is not accessible to other classes, even if they inherit from the class. +- Protected: A protected element can only be accessed within the class and its subclasses. + +There are variations of scope visibility based on the programming language, but these are the most common. + +Learn more from the following resources: + +- [Scope, Visibility and Lifetime of Variables](https://www.youtube.com/watch?v=GQn46bSZE1g) \ No newline at end of file diff --git a/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/103-interfaces.md b/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/103-interfaces.md index ae1d147ef..28fa7b485 100644 --- a/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/103-interfaces.md +++ b/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/103-interfaces.md @@ -1 +1,9 @@ -# Interfaces \ No newline at end of file +# Interfaces + +In object-oriented programming (OOP), an interface is a contract or a set of methods that a class must implement. It defines a common set of methods that a class must provide, but it does not provide any implementation details. An interface can include both method signatures and constants. + +Interfaces are used to define a common behavior for a group of related classes, and to provide a way for objects of different classes to be treated polymorphically. A class that implements an interface must provide an implementation for all of the methods declared in the interface. A class can implement multiple interfaces, but can only inherit from one base class. + +Learn more from the following resources: + +- [Fundamental concepts: What's an Interface?](https://www.youtube.com/watch?v=o1jBgdhQsGo) \ No newline at end of file diff --git a/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/index.md b/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/index.md index 8125d1b1a..ff144e084 100644 --- a/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/index.md +++ b/src/roadmaps/software-design-architecture/content/102-object-oriented-programming/101-paradigm-features/index.md @@ -1 +1,20 @@ -# Paradigm features \ No newline at end of file +# Paradigm Features + +Object-oriented programming (OOP) is a programming paradigm that is based on the concept of "objects," which are instances of a class. OOP has several key features that distinguish it from other programming paradigms: + +1. Encapsulation +2. Inheritance +3. Polymorphism +4. Abstraction +5. Classes +6. Objects +7. Interfaces +8. Dynamic binding +9. Message passing + +These features provide OOP with the ability to model real-world objects and their interactions, making it well-suited for creating complex and large-scale software systems. + + +Learn more from the following resources: + +- [Overview of Object-Oriented Paradigm](https://www.tutorialspoint.com/software_architecture_design/object_oriented_paradigm.htm) \ No newline at end of file