What are Pure Virtual Functions? A pure virtual function is a virtual function in C++ that does not require any function definition and is only declared. It is declared by assigning a value of 0 to the declaration. For instance, What is an Abstract Class? In C++, an abstract class has at least one pure […]
October 27, 2022 | C++ | No comments
Object-oriented programming (OOPs) is a programming approach or pattern in which programs are structured around objects rather than functions and logic. It partitions the data into two memory areas, namely data and functions, and aids in making the code flexible and modular. Concepts of an Object-Oriented Programming language: There are some basic concepts that act […]
September 20, 2022 | C++ | No comments
As we all know, abstraction refers to hiding the internal implementation of a feature and only giving the users the functionality. i.e. how it works (showing), what it does (showing) (hiding). Because an abstraction is achieved using both abstract classes and interfaces, Interface and Abstract classes are needed prerequisites. Let’s see the differences between them. […]
June 3, 2022 | Java | No comments
In Java, an interface is a blueprint for a class. It has abstract methods and static constants. In Java, the interface is a means of achieving abstraction. The Java interface can only have abstract methods, no method bodies. In Java, it is used to achieve abstraction as well as multiple inheritance. Java Interface also represents the […]
June 3, 2022 | Java | No comments
In Java, an abstract class is specified with the abstract keyword. Both abstract and non-abstract methods can be used (method with the body).Note: Abstraction is the process of hiding implementation details from the user and only displaying functionality. A class that is declared using the abstract keyword is known as an abstract class. Abstract classes […]
June 3, 2022 | Java | No comments