Assignment 2
Assignment 2
: 2
Subject: C# Programming and .NET
Q.
No
Question
1. Explain the functions of System.Object class. Give overridden definition for
ToString() and Euals().
2. !hat are the three pillars of object oriented programming in "#$ %ifferentiate
bet&een 'is(a) and 'has(a) relationship* &ith appropriate programs.
3. Explain +oxing and ,n(+oxing* &ith a suitable example.
4. !hat are bugs* errors and exceptions$ -ist and explain the core members of the
System exception type. .o& &ould you build custom exception$
. Explain the follo&ing exception properties &ith suitable programs.
i. /essage
ii. TargetSite
iii. Stac0Trace
iv. %ata
!. !hat is a property in "#$ !hy it is used$ !hat is the advantage of using property
over traditional accessor and mutator methods$
". 1uestion 2o. 3 ( " ) from %ecember 4565 uestion paper.
#. 1uestion 2o. 7( b ) from %ecember 4565 uestion paper.
$. !rite a program to describe sealed class and sealed method.
1%. Explain the follo&ing &ith suitable programs.
i. .andling multiple exceptions.
ii. The finally bloc0.
11. 8llustrate &ith an example* polymorphic support in "#.
12. .o& &ould you enforce encapsulation using accessor and mutators$ Explain &ith
example programs* class properties and static properties in "#.