You are on page 1of 12

Question

1.What is class? ANSWER ==>

2.What is an object? ANSWER ==>

3.What are differences between POP and OOP languages? ANSWER ==>
4.Explain the basic features of OOPs. ANSWER ==>

5.What is difference between Array and Collection? ANSWER ==>

6.What are Access modifiers? ANSWER ==>

7.What is difference between local, static and constant variables? ANSWER ==>

8.What is inheritance? ANSWER ==>

9.What is virtual keyword? ANSWER ==>


10.What is new modifier? ANSWER ==>

11.What is abstract class? ANSWER ==>

12.What is sealed modifier? ANSWER ==>

13.What is pure virtual function? ANSWER ==>

14.What are benefits of Encapsulation? ANSWER ==>

15.Can we specify the access modifier for explicitly implemented interface


ANSWER ==>
method?

16.What is early and late binding? ANSWER ==>

17.What Is CLR? ANSWER ==>

18.What is CTS? ANSWER ==>

19.What is CLS? ANSWER ==>

20.What is an Intermediate Language? ANSWER ==>

21.What is Just In Time Compiler? ANSWER ==>

22.What is Managed Code? ANSWER ==>

23.What is UnManaged Code? ANSWER ==>

24.What is Garbage Collector? ANSWER ==>

25.What is an Assembly? ANSWER ==>

26.What is a Metadata? ANSWER ==>

27.What is a Base class in .Net? ANSWER ==>

28.What are the difference between a Dll and an Exe? ANSWER ==>

29.What are Globalization and Localization? ANSWER ==>

30. What is difference between Code Based Security and Role Based
ANSWER ==>
Security?

31.What are the different Access Modifiers available? ANSWER ==>


32.What are the differences between Class and Struts? ANSWER ==>

33.What are the Similarities between Class and Struts? ANSWER ==>

34.What is Polymorphism? ANSWER ==>

35.What are the Types of Polymorphism? ANSWER ==>

36.What is Method Overloading? Or What is Early Binding? ANSWER ==>

37.What is Method Overriding or What is Late Binding? ANSWER ==>

38.What are the Types of Inheritance? ANSWER ==>

39.What is Multiple Inheritance? ANSWER ==>

40.What are the Advantages of Inheritance? ANSWER ==>

41.What are the examples of Encapsulation? ANSWER ==>


Answers

A class describes all the attributes of objects, as well as the methods that implement the behavior of m
objects. It is a comprehensive data type, which represents a blue print of objects. It is a template of ob

A class can be defined as the primary building block of OOP. It also serves as a template that describe
properties, state, and behaviors common to a particular group of objects.

A class contains data and behavior of an entity. For example, the aircraft class can contain data, such
number, category, and color and behavior, such as duration of flight, speed, and number of passenge
inherits the data members and behaviors of other classes by extending from them.

They are instance of classes. It is a basic unit of a system. An object is an entity that has attributes, be
identity. Attributes and behavior of an object are defined by the class definition.

Procedure Oriented Programming (POP)


1. Main program is divided into small parts depending on the functions.
2. The Different part of the program connects with each other by parameter passing & using operating
3. Every function contains different data.
4. Functions get more importance than data in program.
5. Most of the functions use global data.
6. Same data may be transfer from one function to another
7. There is no perfect way for data hiding.
8. Functions communicate with other functions maintaining as usual rules.
9. More data or functions can not be added with program if necessary. For this purpose full program ne
change.
10. To add new data in program user should be ensure that function allows it.
11. Top down process is followed for program design.
12. Example: Pascal, Fortran
Object Oriented Programming (OOP)
1. Main program is divided into small object depending on the problem.
2. Functions of object linked with object using message passing.
3. Data & functions of each individual object act like a single unit.
4. Data gets more importance than functions in program.
5. Each object controls its own data.
6. Data does not possible transfer from one object to another.
7. Data hiding possible in OOP which prevent illegal access of function from outside of it. This is one o
advantages of OOP also.
8. One object link with other using the message passing.
9. More data or functions can be added with program if necessary. For this purpose full program need
change.
10. Message passing ensure the permission of accessing member of an object from other object.
11. Bottom up process is followed for program design.
12. Example: C++, Java.
The following are the four basic features of OOP:

Abstraction - Refers to the process of exposing only the relevant and essential data to the users w
showing unnecessary information.
Polymorphism - Allows you to use an entity in multiple forms.
Encapsulation - Prevents the data from unwanted access by binding of code and data in a single u
object.
Inheritance - Promotes the reusability of code and eliminates the use of redundant code. It is the p
through which a child class obtains all the features defined in its parent class. When a class inherits th
properties of another class, the class inheriting the properties is called a derived class and the class th
inheritance of its common properties is called a base class.

Array:

You need to specify the size of an array at the time of its declaration. It cannot be resized dynamica
The members of an array should be of the same data type.
Collection:
The size of a collection can be adjusted dynamically, as per the user's requirement. It does not have
Collection can have elements of different types.

Access modifiers (or access specifiers) are keywords in object-oriented languages that set the accessi
classes, methods, and other members. Access modifiers are a specific part of programming language
to facilitate the encapsulation of components. For example : In C# there are 5 different types of Acces
They are Public,Private,protected,internal, protected internal :public
There are no restrictions on accessing public members.
private:
Access is limited to within the class definition. This is the default access modifier type if none is forma
protected:
Access is limited to within the class definition and any class that inherits from the class
internal:
Access is limited exclusively to classes defined within the current project assembly
protected internal:
Access is limited to the current assembly and types derived from the containing class. All members in
project and all members in derived class can access the variables.

You might also like