<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ebeledike Chukwubuikem Frank]]></title><description><![CDATA[Ebeledike Chukwubuikem Frank]]></description><link>https://frank-ebeledike.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 17:06:36 GMT</lastBuildDate><atom:link href="https://frank-ebeledike.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Programing Foundations]]></title><description><![CDATA[In today's world, where technology is evolving very fast, and has several applications, programming has become an essential skill. Whether you aspire to be a software engineer, a data scientist or simply want to automate a task, understanding the fun...]]></description><link>https://frank-ebeledike.hashnode.dev/programing-foundations</link><guid isPermaLink="true">https://frank-ebeledike.hashnode.dev/programing-foundations</guid><category><![CDATA[programming]]></category><category><![CDATA[algorithms]]></category><category><![CDATA[beginner]]></category><category><![CDATA[datastructure]]></category><dc:creator><![CDATA[Frank C. Ebeledike]]></dc:creator><pubDate>Wed, 28 Jun 2023 10:40:03 GMT</pubDate><content:encoded><![CDATA[<p>In today's world, where technology is evolving very fast, and has several applications, programming has become an essential skill. Whether you aspire to be a software engineer, a data scientist or simply want to automate a task, understanding the fundamentals of programming is crucial.</p>
<p>I took a couple of Programming Foundation courses on LinkedIn Learning, under the guidance of the MASL (Microsoft ADC Student League). In this article, I will discuss some of the concepts I learned and also a short introduction to the foundations of programming: Fundamentals, Algorithms, Data Structures, Databases, Object-oriented design, APIs and Web services, Software Testing/QA.</p>
<h3 id="heading-fundamentals">Fundamentals</h3>
<p>Now, what is programming? Programming is the process of converting ideas into instructions that a computer can understand and execute. It's how we get computers to perform tasks and solve problems. For us to communicate this instruction to the computer we use a programming language. Examples include Java, Python, C#, Kotlin and so on. Each of these languages has its syntax and semantics. For example, here is a program that outputs a message to the user in Python</p>
<pre><code class="lang-python">print(<span class="hljs-string">"Hello World"</span>)
</code></pre>
<p>and here is the same thing but using Java</p>
<pre><code class="lang-java">System.out.println(<span class="hljs-string">"Hello World"</span>)
</code></pre>
<p>Another important concept in programming is <strong>variable</strong>. A variable is a named memory location. Imagine how you have some colorful marbles - red, blue, and green. Now, you want to keep track of how many marbles of each color you have. So, you create three small cups, and you label them "red," "blue," and "green." These cups represent variables.</p>
<p>Whenever you find a red marble, you put it in the cup labeled "red." If you find a blue marble, you put it in the cup labeled "blue," and so on. The cups help you organize and remember how many marbles of each color you have. In programming, we use variables to store data temporarily. Data are of different types, for example, Name could have a value of "Esther", age could have a value of 18 and sex could have a value of 'F'. All these are of different <strong>Data Types</strong>.</p>
<p>Now, to write code we need an <strong>IDE</strong> (Integrated Development Environment). An IDE is an application software that has all the special tools needed to improve developer productivity to write, test, and execute software.</p>
<h4 id="heading-algorithm"><strong>Algorithm</strong></h4>
<p>Software drives most of the technology today, and software is powered by algorithms. An algorithm is a step-by-step, unambiguous process of solving a problem or performing a particular task. An algorithm can be classified based on complexity such as space complexity and time complexity. Space complexity is the amount of memory used by the algorithm whereas time complexity is the time taken for the algorithm to complete its operation with the given input. Some common algorithms include searching algorithms, sorting algorithms, computational algorithms and collection algorithms.</p>
<p>Let's take a look at a search algorithm, for example, linear search. <strong>Linear search</strong> is a simple algorithm that searches for a specific element in a list by iterating through each element until it finds a match. Here is a code snippet</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">linear_search</span>(<span class="hljs-params">array, target</span>):</span>
    <span class="hljs-keyword">for</span> index, element <span class="hljs-keyword">in</span> enumerate(array):
        <span class="hljs-keyword">if</span> element == target:
            <span class="hljs-keyword">return</span> index  <span class="hljs-comment"># Found the target element at this index</span>
    <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span>  <span class="hljs-comment"># Target element not found in the array</span>

my_array = [<span class="hljs-number">4</span>, <span class="hljs-number">2</span>, <span class="hljs-number">9</span>, <span class="hljs-number">1</span>, <span class="hljs-number">7</span>, <span class="hljs-number">5</span>]
target_element = <span class="hljs-number">7</span>

index = linear_search(my_array, target_element)
<span class="hljs-keyword">if</span> index != <span class="hljs-number">-1</span>:
    print(<span class="hljs-string">f"Found <span class="hljs-subst">{target_element}</span> at index <span class="hljs-subst">{index}</span>"</span>)
<span class="hljs-keyword">else</span>:
    print(<span class="hljs-string">f"<span class="hljs-subst">{target_element}</span> not found in the list"</span>)
</code></pre>
<p>Here we simply loop through each element in the array and if it's equal to the target element then we return the index. If the target element doesn’t exist in the array, we return <strong>-1</strong>. Linear search has a time complexity of <strong>O(1)</strong> for the best-case scenario and <strong>O(n)</strong> for the worst-case scenario. The space complexity is <strong>O(1)</strong> regardless of the input size.</p>
<h4 id="heading-data-structures"><strong>Data Structures</strong></h4>
<p>In programming, we are always going to be working with different types of data. Data structure helps us organize and manipulate data efficiently. Data structures are essential in programming, as they allow for optimized algorithms and efficient problem-solving. The types of data structure are linear data structure and non-linear data structure.</p>
<p>In a linear data structure, the elements have a linear relationship with its adjacent element whereas in a non-linear data structure, the data elements are not arranged sequentially. Examples of linear data structures are Arrays, Linked Lists, Stacks, and Queues while non-linear data structures are Trees and Graphs. Each type has its characteristics, advantages, and specific use cases.</p>
<p>Let’s discuss our first data structure — arrays. An <strong>array</strong> is a data structure that allows you to store a sequence of elements, where each element is accessed using its index. Here is an example using Python</p>
<pre><code class="lang-python"><span class="hljs-comment"># An array of integers</span>
numbers = [<span class="hljs-number">10</span>, <span class="hljs-number">20</span>, <span class="hljs-number">30</span>, <span class="hljs-number">40</span>, <span class="hljs-number">50</span>]

<span class="hljs-comment"># Accessing each element using it's index</span>
<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(len(numbers)):
    print(<span class="hljs-string">f"Index: <span class="hljs-subst">{i}</span>, Value: <span class="hljs-subst">{numbers[i]}</span>"</span>)
</code></pre>
<p>A <strong>linked list</strong> is a collection of nodes where each node contains both the data and a reference (pointer) to the next node in the list. The last node points to <code>None</code> or <code>Null</code> indicating the end of the list. In this data structure, the elements are not stored at contiguous locations. Several operations can be performed on a linked list but here I will only focus on inserting, removing and displaying the items in a linked list.</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Node</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, data</span>):</span>
        self.data = data
        self.next = <span class="hljs-literal">None</span>

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">LinkedList</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self</span>):</span>
        self.head = <span class="hljs-literal">None</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">is_empty</span>(<span class="hljs-params">self</span>):</span>
        <span class="hljs-keyword">return</span> self.head <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">insert</span>(<span class="hljs-params">self, data</span>):</span>
        new_node = Node(data)
        <span class="hljs-keyword">if</span> self.is_empty():
            self.head = new_node
        <span class="hljs-keyword">else</span>:
            current = self.head
            <span class="hljs-keyword">while</span> current.next <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>:
                current = current.next
            current.next = new_node

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">remove</span>(<span class="hljs-params">self, data</span>):</span>
        <span class="hljs-keyword">if</span> self.is_empty():
            print(<span class="hljs-string">"Linked list is empty."</span>)
            <span class="hljs-keyword">return</span>

        <span class="hljs-keyword">if</span> self.head.data == data:
            self.head = self.head.next
            <span class="hljs-keyword">return</span>

        current = self.head
        prev = <span class="hljs-literal">None</span>

        <span class="hljs-keyword">while</span> current <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>:
            <span class="hljs-keyword">if</span> current.data == data:
                prev.next = current.next
                <span class="hljs-keyword">return</span>
            prev = current
            current = current.next

        print(<span class="hljs-string">f"<span class="hljs-subst">{data}</span> not found in the linked list."</span>)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">display</span>(<span class="hljs-params">self</span>):</span>
        <span class="hljs-keyword">if</span> self.is_empty():
            print(<span class="hljs-string">"Linked list is empty."</span>)
        <span class="hljs-keyword">else</span>:
            current = self.head
            <span class="hljs-keyword">while</span> current <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>:
                print(current.data, end=<span class="hljs-string">" "</span>)
                current = current.next
            print()

<span class="hljs-comment"># Implementation:</span>
my_list = LinkedList()

my_list.insert(<span class="hljs-number">1</span>)
my_list.insert(<span class="hljs-number">2</span>)
my_list.insert(<span class="hljs-number">3</span>)
my_list.insert(<span class="hljs-number">4</span>)
my_list.display()

my_list.remove(<span class="hljs-number">2</span>)
my_list.display()
</code></pre>
<p>From the above snippet, each time we insert an item into the list, the item gets added to the end of the list.</p>
<h4 id="heading-databases">Databases</h4>
<p>Databases help us store, manage, and retrieve large amounts of data efficiently. A database is a structure that stores information in an organized, consistent, reliable and searchable way. There are different kinds of databases such as the Relational database, NoSQL databases, Graph databases and so on.</p>
<p>Let’s focus on the relational database for now. Relational databases store related data in tables with predefined schemas. They use SQL (Structured Query Language) for data manipulation and querying. Examples include MySQL, Oracle Database, PostgreSQL, and Microsoft SQL Server. In a relational database, tables are made up of rows (records) and columns (fields). Each row represents an instance of an entity and columns represent attributes of a given entity. Relational databases are designed to ensure data integrity and consistency by adhering to ACID properties. ACID stands for Atomicity, Consistency, Isolation, and Durability</p>
<h4 id="heading-object-oriented-design-ood">Object Oriented Design (OOD)</h4>
<p>Good software starts with a design. Before writing a single line of code the first thing to do is plan, analyze, and come up with a design. In doing so, we build software that is durable, testable and maintainable. OOD focuses on organizing and structuring code around objects, which are instances of classes that encapsulate data and behavior. In OOD, we use tools such as UML (Unified Modeling Language) to create models of our object-oriented systems. The design process is as follows</p>
<ul>
<li><p>R<strong>equirements</strong> definition</p>
</li>
<li><p><strong>Use case</strong> diagrams and <strong>user stories</strong></p>
</li>
<li><p>Creation of <strong>conceptual model</strong></p>
</li>
<li><p><strong>Class</strong> diagrams</p>
</li>
<li><p><strong>Software</strong> development</p>
</li>
</ul>
<p>The first step in any design process is to gather your requirements. The requirements will contain what the application must do, and maybe how it should do it. In the use case diagram and user stories, the focus is on what the applications must do and how the user will interact with the application. The conceptual model represents important objects and the relationship between them. You can easily spot an object by looking out for nouns in your use case and user stories.</p>
<p>To create class diagrams, we will use UML. Here we must take note of the OOP principles like encapsulation, abstraction, inheritance and polymorphism. Each class diagram might have a name, attributes and behaviors.</p>
<p>Finally, we can start writing code. Here we build actual software. We must take note of some software design patterns, and ensure test-driven development and software development principles such as SOLID, DRY, and YAGNI.</p>
<h4 id="heading-apis-and-web-services">APIs and Web Services</h4>
<p>APIs and Web Services allow different devices to communicate over the internet.</p>
<p>An API (Application Programming Interface) is a set of rules, protocols, and tools that specifies how different software components should interact with each other. A web service is an API that enables communication and data exchange over the internet using standard web protocols. The two types of web services are SOAP (Simple Object Access Protocol) web services and REST (Representational State Transfer) web services.</p>
<p>Web services support reusability. Also since the data is exchanged using JSON or XML format, this allows for interoperability between several systems. APIs and web services provide authentication, authorization, and data encryption to ensure secure communication between different devices.</p>
<h4 id="heading-software-testingqa">Software Testing/QA</h4>
<p>Trying to use a software that doesn’t work can be quite frustrating, that’s why there is a need for proper testing and quality assurance (QA).</p>
<p>Quality assurance is a systematic process used to determine whether a product meets specifications. It includes activities such as requirement analysis, test planning, test case creation, and identifying and reporting bugs. To maintain quality it’s necessary to iterate and improve on all processes in the software development lifecycle.</p>
<p>Software testing is the process of evaluating a software system or its components to ensure it meets the requirements. Software testing requires a strategy. A test strategy describes how a software product will be tested so that anyone can read and understand the scope of testing clearly. There are various types of testing a QA engineer might focus on. These are</p>
<ul>
<li><p>Box testing</p>
</li>
<li><p>Manual testing</p>
</li>
<li><p>UI automation testing</p>
</li>
<li><p>Integration testing</p>
</li>
<li><p>Performance testing</p>
</li>
<li><p>Security testing</p>
</li>
</ul>
<p>When a bug is identified in software, the bug must be reported to the development team. This can be done using a <strong>bug reporting system</strong> to assign, view, triage, report and close bugs.</p>
<h4 id="heading-conclusion">Conclusion</h4>
<p>These topics are the foundations of programming and some of the concepts I learned in the LinkedIn learning courses. Having a good knowledge of each of these topics is enough to help you understand and build scalable and maintainable software. This is only a piece of the iceberg so I didn’t go in-depth to explain most concepts.</p>
<p>Thumbs up for coming this far. Happy learning📚.</p>
<h4 id="heading-references">References</h4>
<p><a target="_blank" href="https://www.linkedin.com/learning/programming-foundations-fundamentals-3">https://www.linkedin.com/learning/programming-foundations-fundamentals-3</a></p>
<p><a target="_blank" href="https://www.linkedin.com/learning/programming-foundations-algorithms?dApp=204528272&amp;leis=MVL">https://www.linkedin.com/learning/programming-foundations-algorithms?dApp=204528272&amp;leis=MVL</a></p>
<p><a target="_blank" href="https://www.linkedin.com/learning/programming-foundations-data-structures-2/understand-data-structures?dApp=204528272&amp;leis=MVL">https://www.linkedin.com/learning/programming-foundations-data-structures-2/understand-data-structures?dApp=204528272&amp;leis=MVL</a></p>
<p><a target="_blank" href="https://www.linkedin.com/learning/programming-foundations-databases-2">https://www.linkedin.com/learning/programming-foundations-databases-2</a></p>
<p><a target="_blank" href="https://www.linkedin.com/learning/programming-foundations-object-oriented-design-3">https://www.linkedin.com/learning/programming-foundations-object-oriented-design-3</a></p>
<p><a target="_blank" href="https://www.linkedin.com/learning/programming-foundations-apis-and-web-services">https://www.linkedin.com/learning/programming-foundations-apis-and-web-services</a></p>
<p><a target="_blank" href="https://www.linkedin.com/learning/programming-foundations-software-testing-qa">https://www.linkedin.com/learning/programming-foundations-software-testing-qa</a></p>
]]></content:encoded></item><item><title><![CDATA[Introduction to Object Oriented Programming (OOP)]]></title><description><![CDATA[Introduction
Object Oriented Programming (OOP) is a type of Programming paradigm that centers around the concept of "objects". You can think of an object as anything. For example, if you look around you, what do you see?. Maybe a chair, a pen or a pe...]]></description><link>https://frank-ebeledike.hashnode.dev/introduction-to-object-oriented-programming-oop</link><guid isPermaLink="true">https://frank-ebeledike.hashnode.dev/introduction-to-object-oriented-programming-oop</guid><category><![CDATA[Object Oriented Programming]]></category><category><![CDATA[Object Oriented concept]]></category><category><![CDATA[software development]]></category><category><![CDATA[programming]]></category><dc:creator><![CDATA[Frank C. Ebeledike]]></dc:creator><pubDate>Fri, 28 Apr 2023 15:39:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1682699853854/651def3a-590b-4688-a617-d1f26b0242b0.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>Object Oriented Programming (OOP) is a type of Programming paradigm that centers around the concept of "objects". You can think of an object as anything. For example, if you look around you, what do you see?. Maybe a chair, a pen or a person, those are objects. An object is a basic unit of a program. It can have an identity, state, and/or behavior. An object represents real-world entities and it is an instance of a class. A class is a blueprint that defines the structure, behavior, and characteristics of an object, serving as a template for its instances.<br />OOP focuses on improving code readability, reusability and maintainability. The are many programing languages today that support OOP, such as Python, Java, Kotlin and so on. In this article, I will be using the Python programming language but the same concepts can be applied to other languages as well.</p>
<p>Below shows a code snippet for a basic class and it's corresponding object</p>
<pre><code class="lang-python"><span class="hljs-comment"># Define a class called person</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Person</span>:</span>
    <span class="hljs-keyword">pass</span>

<span class="hljs-comment"># Create an object of the person class</span>
person = Person()
</code></pre>
<p><strong>Principles of OOP</strong><br />There are four principles of OOP, which form the basis of OOP design. They are Encapsulation, Inheritance, Polymorphism and Abstraction.</p>
<p><strong>Encapsulation</strong>: This principle involves bundling data and behaviors together into a single unit (the class) and hiding the data from other external entities. This principle ensures that the data is protected from unauthorized access or modification. It does this using access modifiers. Access modifiers help to control the visibility and accessibility of the attributes and methods of an object from outside the class. Examples of access modifiers are public, protected and private.</p>
<p>For example, In Python, there is no strict enforcement of access modifiers like in some other programming languages. However, we can still achieve encapsulation by convention using underscores to indicate the visibility of attributes and methods.</p>
<p><strong>Public</strong>: attributes and methods with no underscore prefix can be accessed from anywhere, including outside the class.</p>
<p><strong>Protected</strong>: attributes and methods with a single underscore prefix can accessed from within the class and its subclasses.</p>
<p><strong>Private</strong>: attributes and methods with a double underscore prefix can only be accessed from within the class.</p>
<p>Below shows a code snippet demonstrating encapsulation. The variable height is completely hidden and cannot be accessed outside the Person class</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Person</span>:</span>
  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, name, age, height</span>):</span>
    self.name = name        <span class="hljs-comment"># public attribute</span>
    self._age = age         <span class="hljs-comment"># protected attribute</span>
    self.__height = height <span class="hljs-comment"># private attribute</span>

  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_details</span>(<span class="hljs-params">self</span>):</span>
    <span class="hljs-keyword">return</span> <span class="hljs-string">f"<span class="hljs-subst">{self.name}</span> is <span class="hljs-subst">{self._age}</span> years old and is <span class="hljs-subst">{self.__height}</span>ft tall"</span>

person = Person(<span class="hljs-string">"Dominik"</span>, <span class="hljs-number">21</span>, <span class="hljs-number">5</span>)
print(person.name)
print(person._age)
<span class="hljs-comment"># print(person.__height) -&gt; We can't access this</span>
print(person.get_details())
</code></pre>
<p><strong>Inheritance</strong>: This principle allows new classes to be derived from existing classes, thereby inheriting their attributes and behaviors. A class can inherit from one or more parent classes, and the child class will have the attributes or behaviors of its parent class. A child class can also provide its specific implementation to the methods of the parent class This helps to reduce code duplication, making it easier to maintain and reuse code.</p>
<p>For example, Let's create a Student class that inherits from the Person class. We will give the student class an additional attribute “school”. Due to inheritance, we are able access the <em>name</em> and <em>age</em> variable and also call the <em>get_details</em> method even though it wasn’t declared in the Student class.</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Student</span>(<span class="hljs-params">Person</span>):</span>
  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, name, age, height, school</span>):</span>
    super().__init__(name, age, height)
    self.school = school

student = Student(<span class="hljs-string">"Magret"</span>, <span class="hljs-number">29</span>, <span class="hljs-number">6</span>, <span class="hljs-string">"Federal University of Technology, Minna"</span>)
print(student.name)   <span class="hljs-comment"># Output: Magret</span>
print(student._age)   <span class="hljs-comment"># Output: 29</span>
print(student.get_details())
</code></pre>
<p><strong>Polymorphism</strong>: This principle allows objects to exist in different types. For example, a person can be a student, an engineer, a doctor or a lawyer. An engineer can even be a father, a CEO and so on. In OOP, this means that you can access objects of different types through the same interface. Each type can provide its own custom implementation of this interface or simply rely on the default implementation.</p>
<p>To implement this in python, I will create an additional class (Engineer) that inherits from Person class and provides its own implementation of the <em>get_details</em> method. The object student is both a Student and a Person while the object engineer is both an Engineer and a Person. We can call the <em>get_details</em> method for both objects.</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Engineer</span>(<span class="hljs-params">Person</span>):</span>
  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, name, age, height, skills</span>):</span>
    super().__init__(name, age, height)
    self.skills = skills

  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_details</span>(<span class="hljs-params">self</span>):</span>
    <span class="hljs-keyword">return</span> <span class="hljs-string">f"<span class="hljs-subst">{super().get_details()}</span>. <span class="hljs-subst">{self.name}</span> is also an Engineer with skills in <span class="hljs-subst">{self.skills}</span>"</span>


student = Student(<span class="hljs-string">"Magret"</span>, <span class="hljs-number">29</span>, <span class="hljs-number">6</span>, <span class="hljs-string">"Federal University of Technology, Minna"</span>)
engineer = Engineer(<span class="hljs-string">"David"</span>, <span class="hljs-number">30</span>, <span class="hljs-number">6.5</span>, [<span class="hljs-string">"Java"</span>, <span class="hljs-string">"C++"</span>, <span class="hljs-string">"C#"</span>])
print(student.get_details())
print(engineer.get_details())
</code></pre>
<p><strong>Abstraction</strong>: This principle involves hiding the details of the implementation of an object and providing only essential data/information to the outside world. Imagine you want to turn on your PC, you don't need to know the inner workings of a PC or what happens behind the scene to turn on your PC, you only need to know which button to press to turn on your PC. This is the idea of abstraction in OOP and it helps to reduce complexity and make the code easier to read.</p>
<p>To implement this in python, let’s add an <em>order_food</em> method to our Student class. It takes a few steps to order food, but for a student using this program, we don’t want to bother them with the steps involved in getting this done. The student only get’s a response of whether the order was successful or not.</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Student</span>(<span class="hljs-params">Person</span>):</span>
  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, name, age, height, school</span>):</span>
    super().__init__(name, age, height)
    self.school = school

  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">order_food</span>(<span class="hljs-params">food_name: str</span>):</span>
    <span class="hljs-string">"""
      Check if the food name is part of the MENU
      if true:
        Inform the student that the order is in progress
        prepare the food
        package the food
        deliver the food to the student's dome or hostel
      else:
        Inform the student that the food is currently not available
    """</span>
    <span class="hljs-keyword">pass</span>

student = Student(<span class="hljs-string">"Magret"</span>, <span class="hljs-number">29</span>, <span class="hljs-number">6</span>, <span class="hljs-string">"Federal University of Technology, Minna"</span>)
student.order_food()
</code></pre>
<p><strong>Benefits of OOP</strong></p>
<ul>
<li><p>OOP provides abstraction and polymorphism, which makes the code more flexible as well as easier to read and understand for other developers.</p>
</li>
<li><p>OOP allows us to break down complex software into smaller modules, making it easier to maintain. Also, changes made to a section of the code won't affect other parts of the software, reducing the risk of bugs and errors.</p>
</li>
<li><p>OOP provides Inheritance which enables us to reuse code by creating classes that can be used across different projects and applications. This means that we can avoid duplicating code which saves time and effort.</p>
</li>
</ul>
<p>In conclusion, OOP is a programming paradigm that ensures modularity, code reuse, and abstraction. It provides a flexible and adaptable structure for building complex software systems.</p>
<p>Thank you for reading!</p>
]]></content:encoded></item></channel></rss>