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 / CSE / SEM - V / Code – CS 512 / 2017-18
Paper Name: Object Oriented Methodologies
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) The „<<‟ operator in C++ is associated with


a) „cin‟ b) „cout‟
c) both(a) and (b) d) none of (a) and (b)
ii) Which of the following is used for reference variable declaration in C++?
a) -> b) *
c) & d) ::
iii) The concept of friend function is applicable to
a) C++ b) java
c) both (a) and (b) d) none of (a) and (b)
iv) For C++ which of the following item cannot be inherited in the derived class?
a) public data existing in base class b) public functions existing in base class.
c) constructors existing in base class. d) None of (a), (b) and (c).
v) Which of the following operator cannot be overloaded in C++ ?
a) + b) -
c) * d) sizeof()
vi) Which of the following item is inapplicable within java interfaces?
a) abstract or undefined methods declared with default access specifier
b) abstract or undefined methods declared with public access specifier
c) both (a) and (b) d) private variables
vii) Which of the following is actually responsible for compiling a java source program?
a) JVM b) Web Browser
c) Javax d) JDK
viii) Which of the following invokes superclass constructor from the sub class constructor in java?
a) final b) this
c) super() d) finally
ix) Which of the following is used with the function or method prototype declaration part in java?
a) try b) catch
c) finally d) throws
x) Which of the following keyword is used for refereeing the current invoking object from within a
class member method in java?
a) this b) static
c) final d) finalize

CS 512 Object Oriented Methodologies CSE SEM V PAGE 1 OF 2


GROUP – B
[Short Answer Type Questions]
Answer any four of the following
4 x 5 = 20
2. Discuss some of the important features of OOP in comparison to structured programming
language. [5]
3. What is function overloading? What do you mean by static variables and methods in java? [2+3]
4. Discuss the concept of „private‟ and „public‟ access specifier in C++ with an example. [2.5+2.5]
5. What do you mean by constructors? Discuss the concept of local classes in C++. [2+3]
6. Discuss how command line arguments are tracked in java with a program code example. What is
the role of „protected void finalize(){}‟ method in java? [3+2]
7. Explain try –catch block with example. [5]
GROUP – C
[Long Answer Type Questions]
Answer any three of the following
3 x 15 = 45
8. a) Discuss the concept of reference variable in C++ with an example.
b) Discuss one utility of scope resolution operator and the manipulator „endl‟ statement in C++
c) Discuss the default argument value passing concept for functions in C++? What is the role of
„this‟ keyword in C++?. [5+(3+2)+(3+2)]
9. a) What is the default return type of main() function in C++? Discuss the role of „iostream‟ and
„using namespace std‟ statement in C++.
b) Discuss static variable initialization concept in C++ with an example. What is inline function
in C++?
c) Write a C++ program to overload the binary „+‟ operator. [(1+2+2)+(3+2)+5]
10. a) Discuss the concept and utilities of friend functions in C++ with an example.
b) Discuss the concept of virtual functions in C++ with a program code example.
c) Discuss the different types of possible inheritances in C++. Mention the significance of
„protected keyword in C++. [5+5+5]
11. a) Explain the utility of declaring multiple or single catch blocks just after the try block in a java
program. Mention the differences between error and exception in Java.
b) Discuss the reason for using the try, catch and finally block in java program.
c) What will be the output of the following java program code? Explain your answer.[(3+2)+5+5]
class A{
void show() { System.out.println(“INSIDE A SHOW”); }
void show(int x){ System.out.println(“VALUE OF X:-“+x); }
}
class B extends A{ void show() { System.out.println(“INSIDE B SHOW”); }}
class demo{
public static void main(String args[]){
A a1=new B();
B b1=new B();
a1=b1;
a1.show(); b1.show(7);
}
}
12. Write short notes on any three of the following: [3 × 5 = 15]
a) Multi-Threading in Java
b) Exception class Hierarchy in Java
c) JDK and JUM for Java programming
d) Pointer to members in C++
e) Method overriding in Java
--------------------------X-----------------------------X----------------------------X-------------------------------------
CS 512 Object Oriented Methodologies CSE SEM V PAGE 2 OF 2

You might also like