0% found this document useful (0 votes)
22 views2 pages

Concepts Second Internals Question Bank

This document contains 17 questions about C# programming and .NET concepts such as interfaces, polymorphism, inheritance, and object-oriented programming principles. The questions cover topics like resolving conflicts when implementing multiple interfaces, implementing interfaces in multiple classes, defining interfaces with examples, explicit interfaces, runtime polymorphism, IEnumerator and IEnumerable interfaces, cloning using ICloneable, shallow vs deep copying, the three pillars of OOP (encapsulation, inheritance, polymorphism), encapsulation, inheritance, sealed classes, polymorphism support in C#, defining classes with constructors and methods, extending classes, using classes with namespaces, abstract classes, and static members.

Uploaded by

Vegetto3
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

Concepts Second Internals Question Bank

This document contains 17 questions about C# programming and .NET concepts such as interfaces, polymorphism, inheritance, and object-oriented programming principles. The questions cover topics like resolving conflicts when implementing multiple interfaces, implementing interfaces in multiple classes, defining interfaces with examples, explicit interfaces, runtime polymorphism, IEnumerator and IEnumerable interfaces, cloning using ICloneable, shallow vs deep copying, the three pillars of OOP (encapsulation, inheritance, polymorphism), encapsulation, inheritance, sealed classes, polymorphism support in C#, defining classes with constructors and methods, extending classes, using classes with namespaces, abstract classes, and static members.

Uploaded by

Vegetto3
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

06CS761: C# Programming and .

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

You might also like