mcs-024 june 2007

4
MCA (Revised) Term-End F,xamination June, 2OO7 MCS -ff.l : OBJECT ORIENTED TECHNOLOGIES AND JAVA PROGRAMMING Time : 3 hours Maximum Marks : 700 Nofe r Question number 1 is compulsory. Attempt any three questions from the rest. l. (a) What is java virtual machine ? Explain. 4 (b) What is the differencebetween rnethod overloading and method overriding ? Explain with the help of examples. 3+3 (c) What is data abstraction ? Why are classes known as abstract data types ? 3+2 (d) When is private specifier used in a java program ? 5 Explain with suitable example. (e) What is the difference between an applet and java application program ? 5 MCS-024 P.T.O.

Upload: nitin-nilesh

Post on 07-Sep-2015

215 views

Category:

Documents


0 download

DESCRIPTION

ignou qn paper

TRANSCRIPT

  • MCA (Revised)

    Term-End F,xamination

    June, 2OO7

    MCS -ff.l : OBJECT ORIENTEDTECHNOLOGIES AND JAVA

    PROGRAMMING

    Time : 3 hours Maximum Marks : 700

    Nofe r Question number 1 is compulsory. Attempt any

    three questions from the rest.

    l. (a) What is java virtual machine ? Explain. 4

    (b) What is the difference between rnethod overloading

    and method overriding ? Explain with the help of

    examples. 3+3

    (c) What is data abstraction ? Why are classes known as

    abstract data types ? 3+2

    (d) When is private specifier used in a java program ?

    5Explain with suitable example.

    (e) What is the difference between an applet and java

    application program ? 5

    MCS-024 P.T.O.

  • (f) what happens if we apply final keyword to S

    (i) a class

    (ii) a function

    (iii) a variable

    (g) Write the output of the following :

    ( i ) x : - 1 0 , y : 1

    X

    X

    (ii) String 51 : "Hello,,;String 52 : "Hello";String 53 : "HELLO";System.out.println (S1 + t'equalstt + 52 + rf )f l

    + 51 equals (Sz)h

    System.out.println (S1 + "equals" + 53 + f f >f t

    + 51 . equals (S3)); 2

    ( i i i ) i n t i - 1 5 0 ;

    byte b : byte (i.21; 2

    (h) Write a program in java to print all the arguments inreverse order given at comrnand line. 6

    2. (a) What are the differences in abstract classes andinterfaces in java ? Explain. 6

    (b) what is finalize( ) method in java ? Explain. 4

    (c) What is a package ? How do you create a package

    in java ? Explain with example. s

    MCS-024

  • (d) can you have two variables with the same name intwo interfaces which you are using to derive a newinterface ?

    3' (a) ilfT:'[;T'ffi;: ]:ililothrows

    ? Exp'Iain6

    (b) What are the rnethods of creating threads in java ?

    6Explain.

    (c) What is the use of super keyword in java ? Explain. s

    (d) why do we need static data in a class ? s

    4- (a) Write an Applet in java to print the directory in whichan HTML file containing that applet is stored . s

    '|(b) Explain the three different methods used to create an

    object of InetAddress class. S

    (c) What are the various colour constructors ? 4

    (d) Write a program in java to copy one file to anotherfile using command line arguments. g

    e . g . i n t i X Y i n t i

    \ /Z

    Explain your answer.

    MCS-024 P.T.O.

  • 5. (a)

    (b)

    (c)

    (d)

    Write a program in java to accept an integer number

    from the user. An exception is thrown if number

    entered is

    What are the JAR and Manifest files in java ?

    Static functions can only access static data. Explain.

    Differentiate between TCP client and TCP server

    socket with the help of an example.

    8

    4

    4

    4

    MCS-024 1 1,000