Sunteți pe pagina 1din 2

1

T. Y. B. Sc. IT SEMESTER VI
Chap 13 Test
Time 20 Min Total 20 Marks
Students Name: ____________________________________________ Roll
No:
Match the
a)non virtual
11 Comment on enumeration base type
following
b)overriding
conversion.
1. Containment___ c) has a g) many for
___________________________________________
__
one
___________________________________________
2. Hierarchical
d)is a
h) sealed
___________________________________________
_____
e)one for many
__________________________________________
3. virtual_________
_
4. new___________
List 2 specialties of virtual method.
12 Two accessibility constraints
_____________________________________________
1) _________________________________________
_____________________________________________
___________________________________________
_____________________________________________
2) _________________________________________
_____________________________________________
___________________________________________
Two differences between structure and class
13 Role of abstract classes in inheritance.
_____________________________________________
___________
_____________________________________________
___________________________________________
___________________________________________
___________ & ________ modifiers cannot be
14 Under line the error in code give
joined for a struct. Derive class can allow
reason below : class dukhi{ public void
further overriding by ________ key word.
add (){}
_________ is use for inheritance.
protected object add(int x, float d) {return
1. virtual method can be abstract.
YES /
x+d;} }
NO
public class dukhilal: dukhhi { public void
2. non sealed class cannot be inherited
add(int a, int b){}
directly. YES/ NO
public new string add(int xx, double dd)
3. protected constructer cant be use by
{return 9;}}
derive YES / NO
___________________________________________
4. multiple classes can be inherited by one
___________________________________________
class using multilevel inheritance. YES /
NO
Default visibility of class is ________________
15 Name two forms of inheritance
and default visibility of class member is
1) _________________
n______________
2) __________________
a) public b) static c) protected d) new e)
internal f) void
How will you override a method for which
16 What if the new does not get any match
you dont have permission
for method
17 _____________ prevents inheritance.
______________________________
____________________________________________
Complete the following code snippet :
18 Four terms used for Run time
class Hiralal{
polymorphism 1) _____
________Hiralal(int a, int b, int c){}
___________________2) ______________________
public static void i_m_private(){}
_____________3)____________________________
public _______ void i_m_private(int a, float b,
_
char c)
________4)_________________________________
{System.Console.Write(I m Possible);}}
_

1
0

class pannalal:Hiralal{
19 1 Difference between compile time and
public pannalal(int a, int b, int
runtime poly
c)_______________{}
___________________________________________
public ___________ i_m_private();
___________________________________________
}
Assembly AnyWher Sub class
20
Class Champalal:pannalal {
__________Champalal(int a,float dd, int b, int
e
c, char d) ___________________ {}
protected
public static void main(){ new
internal
Champalal(1,1,1,1 , a);}
protecte
}
d
class test{public static void Main()
internal
{Champalal.______; }}
Define
enumeration_________________________________________________________________________________
_________________________________________________________________________________________________
Marks Obtained __________ in Words ___________________________ Signature of the
Examiner________

S-ar putea să vă placă și