HI WELCOME TO KANSIRIS
Showing posts with label oops. Show all posts
Showing posts with label oops. Show all posts

Difference Between Generalization and Specialization

The process of extracting common characteristics from two or more classes and combining them into a generalized superclass, is called Generalization. The common characteristics can be attributes or methods. Generalization is represented by a triangle followed by a line. Specialization is the reverse process of Generalization means creating new sub classes from an existing class. Let’s take an example of Bank Account; A Bank.

Understanding Inheritance and Different Types of Inheritance

Inheritance is a mechanism of acquiring the features and behaviours of a class by another class. The class whose members are inherited is called the base class, and the class that inherits those members is called the derived class. Inheritance implements the IS-A relationship. For example, mammal IS-A animal, dog IS-A mammal; Hence dog IS-A animal as well. Different Types of Inheritance OOPs support the six different types of.

Understanding Association, Aggregation, Composition and Dependency relationship

A relationship defines the connection between objects. This explains how objects are connected to each other’s and how they will behave. Association It represents a relationship between two or more objects where all objects have their own lifecycle and there is no owner. The name of an association specifies the nature of relationship between objects. This is represented by a solid line. Let’s take an example of relationship.

Difference between function and method

In programming langauages we have two concepts functions and methods. functions are defined in structural language and methods are defined in object oriented langauge. The difference between both is given below : Functions Functions have independent existence means they can be defined outside of the class. Ex:- main() function in C, C++ Language Functions are defined in structured languages like Pascal,C and object based language like javaScript Functions are called independently. Functions are self describing unit.

Difference between object oriented and object based languages

Object oriented and Object based programming languages have some different features and behaviour. In this article, I am going to expose the main difference between these two programming languages. Object oriented language Object-oriented language supports all the features of OOPs. Object-oriented language doesn't has in-built object. Object-oriented languages are C++, C#, Java etc. Object based language Object-based language doesn't support all the features of OOPs like Polymorphism and Inheritance Object-based.