Concepts Second Internals Question Bank
Concepts Second Internals Question Bank
NET
Concepts
Second internals question bank
1. What are interfaces? In what way are they better as compared to abstract class?
2. How will you resolve member conflict while implementing multiple interfaces? Explain
3. Explain the implementation of one interface in multiple classes with example.
4. Define an interface. Explain with an example is, as operator.
5. Explain explicit interfaces in c# with examples
6. What are the types of polymorphism? Explain how run Runtime polymorphism is
achieved?
7. With examples explain following
a)IEnumerator and IEnumerable
b)ICloneable
8. Define clone() and Memeberwiseclone() method. Specify its usage.
9. Distinguish between shallow and deep copy as applied to cloning. How would you
implement cloning using ICloneable interface?
10. Explain about the three pillars of OOP.
11.What is encapsulation? What are the two ways of enforcing encapsulation?
Give examples for both methods
12. Explain concept of Inheritance with help of example?
13. Explain concept of sealed class with example.
14. What is polymorphism? How to achieve it? Illustrate with example, polymorphic
support in C#
15.Write a program to define a class person with the members
a) name, DOB, address in string format
b) create the appropriate constructors
c) design a method that prints the details in the format “ ABC lives in <address>
and was born on <DOB>”
d) extend a employee class from the person with the field
e) demonstrate the entire problem by creating the objects of employee & display
their compute details
16.Write a program to define a class vehicle and a class engine. Let the vehicle
class contain engine. The engine should be started at the source and stopped
after reaching the destination. Let the speed and the distance be read. Show
the usage of the functions in the class with the help of an application class. Use
the appropriate namespace
17. Create a abstract class institution with a static member name and an abstract method give
salary. Derive the class adminstaff, lectures and professor from institution. Define the
members of each of derived classes suitably and the inherited abstract member. Show the
usage of class members through the objects of respective classes