Professional Documents
Culture Documents
it’s full of (i) side effects (e.g., print statements, pretty-printed dataframes, data
visualisations) and (ii) glue code without any abstraction, modularisation, and automated
tests. While this may be fine for notebooks targeted at teaching people about the machine
learning process,
OOP
A technique for system modeling:
To be truly practicing object-oriented programming, you must be using all three of the "pillars",
i.e., encapsulation, inheritance, and polymorphism.
Aggregation implies a relationship where the child can exist independently of the parent.
Example: Class (parent) and Student (child). Delete the Class and the Students still exist.
Composition implies a relationship where the child cannot exist independent of the parent.
In object-oriented programming, inheritance is the mechanism of basing an object or class upon
another object or class, retaining similar implementation. Also defined as deriving new classes from
existing ones such as super class or base class and then forming them into a hierarchy of classes
Polymorphism is the ability of an object to take on many forms. The most common use
of polymorphism in OOP occurs when a parent class reference is used to refer to a child class
object. Any Java object that can pass more than one IS-A test is considered to be polymorphic.
Circular Linked List is a variation of Linked list in which the first element points to the last
element and the last element points to the first element. Both Singly Linked List and
Doubly Linked List can be made into a circular linked list.