APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : SEMESTER 4

Year : 2019

Term : DECEMBER

Scheme : 2015 Full Time

Course Code : CS 206

Page:2





PDF Text (Beta):

10

11

12

13

14

a)

b)

௦)

a)

b)

a)

b)

D192057 Pages:3

instances. Support the design with codes to demonstrate its working.

PART C

Answer all questions, each carries 3 marks.

State the benefits that can be achieved through the use of packages in Java.
What is file? How files are represented in Java?
Illustrate with an example, how a class in Java can be prevented from getting
inherited?
Write two subclasses for the ‘InputStream’ and ‘OutputStream’ classes in Java and
specify its uses.

PART D

Answer any two full questions, each carries 9 marks.

Can a class in Java implement more than one interfaces, if yes what is the syntax

used?

Consider a scenario where there are two classes: ‘BaseClass’ and ‘DerivedClass’,
such that ‘DerivedClass’ is inherited from ‘BaseClass’. A function ‘public void
myFunction()’ is defined in both classes. State just the code sequences that would
lead to a method overriding scenario and why this scenario is known as run time
polymorphism?

Write a Java program to create a new file named ‘MyFile.txt’ and write the
statement “777/6 is the University Exam for OODP. This a program to illustrate the
use of files.” into the file with each sentence in the statement representing a new
line in the file.

With a suitable example summarize how 0 to 100% abstraction can be achieved
through the use of Abstract class in Java?

What is Thread Synchronization? With an example illustrate the working of any
one technique used for Thread synchronization in Java.

Define two णडल defined exception ‘EvenNumberException’ and
‘OddNumberException’. Write a Java class which has a method which checks
whether a given number if even or not. The method _ throws
‘EvenNumberException’ or ‘OddNumberException’ if the number is even or odd
respectively. Illustrate the handling of the exception with suitable sequence of
codes.

Illustrate the use of the byte stream classes ‘DatalInputStream’ and

Page 2 of 3

(3)
(3)
(3)

(3)

(1)

(2)

(6)

(3)

(6)

(7)

(2)

Similar Question Papers