You are on page 1of 1

T. Y. B. Sc.

IT

SEMESTER VI

Test Chap 14
Time 20 Min
Date____________
Students Name: ____________________________________________ Roll
No:

Total 20 Marks

a) Constant_____________
b) Array_______________
c) abstract method_______
d) Copy Constructor_____
e) Property.____________
2 Differences between classes and Interface methods
1) __________________________________________
___________________________________________
2) __________________________________________
___________________________________________
List 4 modifiers that can used with interface methods
___________________________________________
___________________________________________

11

Use of as keyword
___________________________________________
___________________________________________
State whether the statements are true or false
1) interface cannot have non static member. _____
2) interface is value type. ______
3) Interface can have a property with get set ____
4) Multilevel inheritance is not allowed in Interface___
5) Two interfaces cannot use same base interface ____
Use of : (colon) in class for interface

14

16

______________ & _________ modifiers cannot be


used with interface members.

General syntax for declaring a class that implements an


interface and a class

17

General syntax of using a property in interface

8
&
18

Comment on the following code snippet :


interface Mobile {void show();}__________________
class Nokia:Mobile{void show(){}}_______________
Mobile m[] = new Mobile[10] ___________________
For(i=0;i<10;i++) m[i] = (Mobile) new Nokia()______

9
&
19

correct & Rewrite the code


interface a{private void aa() }
struct b:a{public void aa(){}}
class test : b {
public static void Main(){
aa(); }}
How an interface is use to call a its own method

10

Mark
V for valid
I for invalid
Member of interface

12

13

15

Interface to class type conversion.


____________________________________________
___________________________________________
__ __________________________________________
___________________________________________
2 advantages of abstract class over interface
1) ____________________________________
____________________________________
2) ____________________________________
____________________________________
When will u apply multiple interface implementation.
___________________________________________
___________________________________________
When will u apply explicit interface implementation.
___________________________________________
___________________________________________
interface a{void show();}
interface b:a{void
show();}
interface C:b{void show();}
create a class that implements C

____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
19

____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________

20

Similarities in classes and interfaces


1)__________________________________________
2)___________________________________________

Marks Obtained __________ in Words ___________________________ Signature of the


Examiner______________

You might also like