OOP's concept

What is C language?

The C programming language is a standardized programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the UNIX operating system.


Q1. What is Object Oriented Programming?
Ans:-
a)     Object Oriented Programming decomposes a program into real world entities called as objects and then creates data and function around these objects.  
b)    Object Oriented Programming is based on 4 major pillars which are as follows:
                                                                   i.            Abstraction:-
This deals with identifying the key aspects of a system. This is normally required during requirement analysis phase.
                                                                 ii.            Encapsulation:-
The key aspects identified during abstraction are secured using encapsulation. This deals with hiding the interface from implementation. Hence its purpose is security.
                                                              iii.            Inheritance:-
This deals with incorporating the essential features from a base class in a derived class. Thus it helps in reusability of methods and its main purpose is for grouping.
                                                              iv.            Polymorphism:-
This helps when a same message is sent by different objects to obtain different behaviour from a method.
    c)   Object Oriented Programming also has 3 minor pillars which are as follows:
                                                                   i.            Strong type casting:-
This helps in avoiding mixing of abstraction i.e. key aspects identified during requirement analysis.
                                                                 ii.            Persistence:-
This helps in a safe state of an object.
                                                              iii.            Concurrency:-
This deals with simultaneously performing various tasks for better performance.
Q2. What is an object and a class?
Ans:-
a)     Object:-
·        An object is an real-world entity that has a structure and behaviour
·        The characteristics of an object are as follows:-
                                                                   i.            Identity
                                                                 ii.            State
                                                              iii.            Behaviour
                                                              iv.            Responsibility
b)    Class:-
·        A class is a template.
·        It can also be described as a collection of data members and member functions.



No comments:

Post a Comment