Vous êtes sur la page 1sur 2

What do you mean by Function Overloading

When more than one function is created with the same name, but different is of there
arguments.
In other words, function names can be overloaded. A function may also have the same
name as an attribute. In the case that there is an ambiguity between a function on a
complex type and an attribute of the complex type, the attribute will always be used.

What Is OOPS
OOPs is an Object Oriented Programming language, which is the extension of Procedure
Oriented Programming language. OOPS reduce the code of the Program because of the
extensive feature of Polymorphism. OOPS have many properties such as Data-Hiding,
Inheritance, Data Abstraction, Data Encapsulation and many more Everything in the
world is an object. The type of the object may vary. In OOPS, we get the power to create
objects of our own, as & when required.

What is Class
A group of objects that share a common definition and that therefore share common
properties, operations, and behavior. A user-defined type that is defined with the class-
key 'class,' 'struct,' or 'union.' Objects of a class type consist of zero or more members and
base class objects. Classes can be defined hierarchically, allowing one class to be an
expansion of another, and classes can restrict access to their members.

What is Constructor
When we create instance of class a special method of that class, called that is constructor.
Similarly, when the class is destroyed, the destructor method is called. These are general
terms and usually not the actual member names in most object-oriented languages. It is
initialized using the keyword New, and is destroyed using the keyword Finalize.

What is Abstract Class


Classes that cannot be instantiated. We cannot create an object from such a class for use
in our program. We can use an abstract class as a base class, creating new classes that
will inherit from it. Creating an abstract class with a certain minimum required level of
functionality gives us a defined starting point from which we can derive non-abstract
classes. An abstract class may contain abstract methods & non-abstract methods. When a
class is derived from an abstract class, the derived class must implement all the abstract
methods declared in the base class. We may use accessibility modifiers in an abstract
class. An abstract class can inherit from a non-abstract class. In C++, this concept is
known as pure virtual method.
What is Value Type
Value Types - Value types are primitive types. Like Int32 maps to System.Int32, double
maps to System.double. All value types are stored on stack and all the value types are
derived from System.ValueType. All structures and enumerated types that are derived
from System.ValueType are created on stack, hence known as ValueType.In value type
we create a copy of object and uses there value its not the original one.

What is difference between abstract class and an


interface
An abstract class and Interface both have method only but not have body of method. The
difference between Abstract class and An Interface is that if u call Ablstract class then u
have to call all method of that particular Abstract class but if u call an Interface then it is
not necessary that u call all method of that particular interface.Method OverLoading:-
Return type, Parameter type, parameter and body of method number may be
different.Method Overriding: - Return type, Parameter type, Parameter Number all must
be same . Only body of method can change.

Vous aimerez peut-être aussi