Category: OOPS
What are coupling and cohesion? Coupling The degree of dependency between the component is called coupling. If the dependency is more then it is considered as tightly coupling and dependency are less then it is considered as loosely coupling. Example Class A{ static int i=B.j } Class B{ Static int . . . Read more
Difference between overriding and overloading? Overloading Two methods are said to be overloaded if and only if both methods having the same name but difference arguments types. In C-language method overloading concept is not available hence we can’t declare multiple methods with same name but different arguments types. If there . . . Read more
Difference between IS-A relationship and Has-A relationship. IS-A Relationship It is known as an inheritance The main advantage of IS-A relationship is code reusability. By using extends keyword we can implement IS-A relationship. Whatever method parent has by-default available to the child and hence on the child reference we can call . . . Read more
What is Encapsulation? The process of binding data and corresponding method into a single unit is nothing but encapsulation. If any component follows Data Hiding and Abstraction such type of component is said to be encapsulated component. Encapsulation = Data hiding + Abstraction. Encapsulation is a principle of wrapping data . . . Read more
What is Abstraction? Abstraction is one of the most important principles in object-oriented software engineering and is closely related to several other important concepts, including encapsulation, inheritance, and polymorphism. Hiding internal implementation and just highlight the set of services what we are offering, is the concept of abstraction. Through Bank ATM . . . Read more
What is Data hiding? Data hiding is a software development technique specifically used in object-oriented programming (OOP) to hide internal object details (data members). Data hiding ensures exclusive data access to class members and protects object integrity by preventing unintended or intended changes. Data hiding also reduces system complexity for . . . Read more
What is the interface and How it differs from an abstract class? Any service requirement specification (SRS) is considered as an interface. From a client point of view, an interface defines the set of services what he is expecting. From service provider point of view, an interface defines the set . . . Read more