Posts

Showing posts from November, 2020

Day 10 : TypeScript

Image
         In this blog we are going to understand the abstract and interface. Abstract class : Semantically an abstract class is a half defined parent class. An abstract class is mainly used for inheritance where other classes derive from them. Abstract class is defined using "abstract" keyword. We cannot create instance of an abstract class. The classes which extends the abstract class must define all the abstract methods. The abstract classes not contain the function or method body. Example : Generalization : Generalization is a another word for parent class. Generalization is the process of extracting shared characteristics from two or more classes and combining them into a class or superclass. Specialization : Specialization is a another word for child class. Specialization is the process of creating new subclasses from old one. The child class also named as concrete class. Interface : An interface is an abstract type but not contain any code like a class. An...