You are on page 1of 2

GOVERNMENT COLLEGE OF ENGINEERING & CERAMIC TECHNOLOGY

AN AUTONOMOUS INSTITUTE
AFFILIATED TO MAKAUT (FORMELY KNOWN AS WBUT)
Theory / B. Tech / IT / SEM - V / Code – IT 510 / 2016-17
Paper Name: Object Oriented Programming & Systems
Full Marks: 75 Time Allotted: 3 hours
The figures in the margin indicate full marks. Candidates are required to give their answers in their own words as far as practicable.

GROUP – A
[MCQ Type Questions][Compulsory]
1. Choose the correct alternative of the following questions. Answer all questions. 10 x 1 = 10

i) Which of the following statements about arrays is syntactically wrong


a) arrayName[] p = new arrayName[10]; b)arrayNamep[10]
c) arrayName[] p []; d) arrayNamep[][] = new arrayName[10][];
ii) Which type of inheritance is not supported by java
a) Single b) Multiple
c) Mulilevel d) Hirarchical
iii) Methods that have same name, but different Parameter list and different definition known as
a) Overriding b) Constructor
c) Overloading d) none of these
iv) The concept of multiple inheritance is implemented in Java by
a) Extending two or more classes
b) Extending one class and implementing one or more interfaces
c) Implementing two or more interfaces d) All of these
v) Exception is defined in ……………… package.
a) java.util b) java.lang
c) java.awt d) java.io
vi) The parent class of all the exceptions in java is
a) Throwoable b) Throw
c) Exception d) Throws
vii) What is the correct declaration of an abstract method that is intended to be public?
a) public abstract void add(); b) public abstract void add() {}
c) public abstract add(); d) public virtual add();
viii) Which of the following do not lead to runtime error?
a) "john" + "was" + "here" b) "john" + 3
c) 3 + 5 d) 5 + 5·5
ix) Under what situations do you obtain a default constructor?
a) When you define any class b)When the class has no other constructors
c) When you define at least one constructor d)None of these
x) What is the return type of Constructors?
a) int b) float
c) void d) None of these

IT 510 Object Oriented Programming & Systems IT SEM V PAGE 1 OF 2


GROUP – B
[Short Answer Type Questions]
Answer any four of the following
4 x 5 = 20
2. Explain Association, Aggregation and Composition class relationship with suitable example. [5]
3. Why java is called platform independent language? Explain the use of “this” keyword in java. [3+2]
4. Briefly describe Java Virtual Machine. Write a Java program to print the amount of memory is
occupied by your program in heap. [3+2]
5. Explain “public static void main ( String[] args )” in brief. Also write a java program to find the
factorial of a number inputted through command line as argument. [2+3]
6. How do we define try and catch block? Is it essential to catch all types of exception? Explain.
[3+2]
7. Describe different forms of inheritance with examples. [5]

GROUP – C
[Long Answer Type Questions]
Answer any three of the following
3 x 15 = 45
8. a) Discuss the different levels of access protection available in Java.
b) Describe briefly method overloading with suitable java code.
c) How does method overloading differ from method overriding?
d) Write a complete Java Program to explain how “multiple inheritance” is implemented in Java.
[3 + 4 + 3 + 5]
9. a) Write a java program to multiply two matrices.
b) Write a complete Java Applet program to draw a rectangle filled with blue color.
c) Briefly discuss Data Types in Java. [5+6+4]

10. a) Write a small program to synchronize among two threads.


b) Describe the life cycle of Thread.
c) Write a program to describe inter Thread communication. [5+ 5 + 5]

11. a)Explain the use of „extends‟ keyword in java with suitable code example.
b)Write a java program to design a „Student‟ class having Id,Name, Age, Roll And Department
as data members and methods ReadData() to read Student information, Display() to show
Student information with appropriate constructors and test class also write a method which will
generate Id and assign it to the object created .
c) What is object reference? Write a program to print the „hexcode‟ of an object created in the
heap. [4+6+(2+3)]
12. a)Write a complete Java program to print the Fibonacci series up to n terms. Input should be
taken using BufferedReader class, Exception must be handled with custom error message.
b)Differentiate between String and String Buffer.
c)Explain constructor chaining with suitable code example?
d)Write a complete Java Applet program to Show the Life Cycle of an Applet. [5+4+3+3]
13. Write short notes on any three of the following: [3 × 5 = 15]
a) Thread Synchronization.
b) Operators in Java
c) Exception Handling in Java
d) JVM
e) Anonymous Inner Class.
f) Polymorphism
*****************************************************************
IT 510 Object Oriented Programming & Systems IT SEM V PAGE 2 OF 2

You might also like