Entradas

Binary trees

Imagen
Oscar David Porras Orjuela - 854046 Juan Sebastian Barrera Lasprilla - 833481 Introduction Binary trees are fundamental data structures in computer science, widely used for organizing and manipulating hierarchical data. we are going to show you the basic concepts of binary trees and how implementat it in Java. What are Binary Trees? It is a tree-like data structure consisting of nodes, where each node can have at most two child nodes, referred to as the left child and the right child.  The topmost node in a binary tree is known as the root. Nodes in a binary tree can be connected in a way that reflects a hierarchical relationship, making it an efficient choice for organizing data that has a parent-child association. Glossary Node:    Each element in a binary tree is called a node. It contains data and pointers to its left and right child nodes. Root:   The topmost node of a binary tree is referred to as the root. Leaf Node:   Nodes that do not have any child nodes .

Inheritence and Polymorphism

Imagen
Students Oscar David Porras ID: 854046 José Antonio Valderrama ID:  846809 Inheritence and Polymorphism They are mechanisms that are very useful in object-oriented-programming. In this blog, we'll explain you what is these. Inheritence What is that? It's a mechanism in object-oriented-programming, it's useful to reuse code, because if one or more classes are similar, you can write the features in a class and inherit theses features in other class.  In the inheritance there are one or more classes called  superclasses, these classes inherit other classes called subclasses, the superclass inherits its attributes and methods. The Subclasses besides the sperclass' attributes and methods have own methods and could be superclasses of other subclasses. Types of inheritence Single Inheritence The subclass only inherits features from a single superclass, in this type of inheritence the subclasses can add own attributes and methods         Multiple inheritance In this type of inh