OOP Important Notes
Q. What is OOPS?
Object-oriented programming (OOP) is
a programming language model that organized
around objects rather than "actions". A program has been viewed as a
logical procedure that takes input data, processes it, and produces output
data.
Q. Basic Concepts of OOPs?
Abstraction.
Encapsulation.
Inheritance.
Polymorphism.
Q. What is a class?
Class is a set of things having some
property or attribute in common and differentiated from others by kind, type,
or quality.
Q. What is an object?
Objects are created from Classes, in
C#, is an instance of a class that is created dynamically. Object is also a
keyword that is an alias for the predefined type System.
Q. What is Encapsulation?
Encapsulation is the packing of data
and functions into a single component. It allows selective hiding of properties
and methods in an object by building an impenetrable wall to protect the code
from accidental corruption.
Q. What is Polymorphism?
In programming languages and type
theory, polymorphism is the provision of a single interface to entities of
different types.
A polymorphic type is a type whose
operations can also be applied to values of some other type, or types.
Q. What is Inheritance?
inheritance is when an object or
class is based on another object or class. It is a mechanism for code reuse and
to allow independent extensions of the original software via public classes and
interfaces.
Comments
Post a Comment