Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Languages?
Function Overloading
Polymorphism means that functions assume different forms at different
times. In case of compile time it is called function overloading.Two or more
functions can have same name but their parameter list should be different
either in terms of parameters or their data types. The functions which differ
only in their return types cannot be overloaded. The compiler will select the
right function depending on the type of parameters passed.
Operator overloading
In polymorphism operators can also be overloaded (Compile time
polymorphism). Operators can be overloaded in order to perform special
functions with respect to the class. With the help of operator overloading
standard operations such as + , - , * , etc can be applied on the objects of
the class.
What is Encapsulation in Object Oriented Programming (OOPS)
Languages?
What is inheritance?
We use abstract class and interface where two or more entities do same type
of work but in different ways. Means the way of functioning is not clear while
defining abstract class or interface. When functionality of each task is not
clear then we define interface. If functionality of some task is clear to us but
there exist some functions whose functionality differs object by object then
we declare abstract class.
We can declare a static class. We use static class when there is no data or
behavior in the class that depends on object identity. A static class can have
only static members. We can not create instances of a static class using the
new keyword. .NET Framework common language runtime (CLR) loads Static
classes automatically when the program or namespace containing the class
is loaded.