Object Oriented Flashcards

1
Q

What is a class?

A

Class is concrete representation of an entity. It represents a group of objects, which hold similar attributes and behavior. It provides abstraction and encapsulations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an Object?

A

Object represents/resembles a Physical/real entity. An object is simply something you can give a name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Abstraction?

A

Hiding the complexity. It is a process of defining communication interface for the functionality and hiding rest of the things.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Static class?

A

Static class is a class which can be used or accessed without creating an instance of the class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is sealed class?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of an Assembly?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is static member?

A

The member defined as static which can be invoked directly from the class level, rather than from its instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Overloading?

A

A process of creating different implementation of a method having a same name as base class, in a derived class. It implements Inheritance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a constructor?

A

A constructor is invoked when you use the new operator, or use the various methods of reflection to create an instance of a class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Polymorphism?

A

Mean by more than one form. Ability to provide different implementation based on different number / type of parameters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is an Interface?

A

An interface has no implementation; it only has the signature or in other words, just the definition of the methods without the body.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Method overloading?

A

Method overloading occurs when a class contains two methods with the same name, but different signatures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Method Overriding?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is an abstract class?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the difference between Structure and Class?

A

■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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is difference between Class And Interface?

A
Class : is logical representation of object. It is collection of data and related sub procedures with defination.
Interface : is also a class containg methods which is not having any definations.Class does not support multiple inheritance. But interface can support.
17
Q

What is difference between constants, readonly and, static?

A

■Constants: The value can’t be changed.
■Read-only: The value will be initialized only once from the constructor of the class.
■Static: Value can be initialized once.