Object Oriented Flashcards
What is a class?
Class is concrete representation of an entity. It represents a group of objects, which hold similar attributes and behavior. It provides abstraction and encapsulations.
What is an Object?
Object represents/resembles a Physical/real entity. An object is simply something you can give a name.
What is Abstraction?
Hiding the complexity. It is a process of defining communication interface for the functionality and hiding rest of the things.
What is a Static class?
Static class is a class which can be used or accessed without creating an instance of the class.
What is sealed class?
Sealed classes are those classes which can not be inherited and thus any sealed class member can not be derived in any other class. A sealed class cannot also be an abstract class.
What is the purpose of an Assembly?
An assembly controls many aspects of an application. The assembly handles versioning, type and class scope, security permissions, as well as other metadata including references to other assemblies and resources. The rules described in an assembly are enforced at runtime.
What is static member?
The member defined as static which can be invoked directly from the class level, rather than from its instance.
What is Overloading?
A process of creating different implementation of a method having a same name as base class, in a derived class. It implements Inheritance.
What is a constructor?
A constructor is invoked when you use the new operator, or use the various methods of reflection to create an instance of a class.
What is Polymorphism?
Mean by more than one form. Ability to provide different implementation based on different number / type of parameters.
What is an Interface?
An interface has no implementation; it only has the signature or in other words, just the definition of the methods without the body.
What is Method overloading?
Method overloading occurs when a class contains two methods with the same name, but different signatures.
What is Method Overriding?
An override method provides a new implementation of a member inherited from a base class. The method overridden by an override declaration is known as the overridden base method.
What is an abstract class?
An abstract class is a class that must be inherited and have the methods overridden. An abstract class is essentially a blueprint for a class without any implementation.
What are the difference between Structure and Class?
■Structures are value type and Classes are reference type.
■Structures can not have contractors or destructors. Classes can have both contractors and destructors.
■Structures do not support Inheritance, while Classes support Inheritance