Download GTU BE/B.Tech 2018 Winter 5th Sem New 2150704 Object Oriented Programming Using Java Question Paper

Download GTU (Gujarat Technological University) BE/BTech (Bachelor of Engineering / Bachelor of Technology) 2018 Winter 5th Sem New 2150704 Object Oriented Programming Using Java Previous Question Paper

www.FirstRanker.com
1
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY

BE - SEMESTER ?V (NEW) EXAMINATION ? WINTER 2018
Subject Code:2150704 Date:11/12/2018

Subject Name:Object Oriented Programming using JAVA

Time: 10:30 AM TO 01:00 PM Total Marks: 70

Instructions:

1. Attempt all questions.

2. Make suitable assumptions wherever necessary.

3. Figures to the right indicate full marks.

MARKS

Q.1 (a) Define following.
1) Byte code
2) Java Virtual Machine
3) Unicode
03
(b) Write a program which takes five numbers as command line
argument from user, store them in one dimensional array and
display count of negative numbers.
04
(c) What do you mean by Interface? Compare interface and abstract
class with suitable example.
07

Q.2 (a) When will you declare a method as a static? Explain static method
with suitable example.
03
(b) Explain inner class with example. 04
(c) Explain following keywords of java with example.
1) final
2) finally
07
OR
(c) Explain following keywords of java with example.
1) super
2) this
07
Q.3 (a) What is java collection framework? What are the benefits of the
java collection framework?
03
(b) What is Exception? Demonstrate how you can handle different
types of exception separately.
04
(c) What is dynamic method dispatch? Explain with suitable
example.
07
OR
Q.3 (a) What is wrapper class? What is the use of wrapper class in Java? 03
(b) What do you mean by Overloading? Explain constructor
overloading with suitable example.
04
(c) Explain following keywords with example
1) throw
2) throws
07
Q.4 (a) Write a program that reads file name from user, through command
line argument and displays/reads content of the text file on
console.
03
(b) What is package? What are the requirements of it? What we can
achieve using package?
04
(c) What is multithreading? What are the ways in which you can
create a thread? Explain with Example
07

www.FirstRanker.com www.FirstRanker.com
www.FirstRanker.com
FirstRanker.com - FirstRanker's Choice
www.FirstRanker.com
1
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY

BE - SEMESTER ?V (NEW) EXAMINATION ? WINTER 2018
Subject Code:2150704 Date:11/12/2018

Subject Name:Object Oriented Programming using JAVA

Time: 10:30 AM TO 01:00 PM Total Marks: 70

Instructions:

1. Attempt all questions.

2. Make suitable assumptions wherever necessary.

3. Figures to the right indicate full marks.

MARKS

Q.1 (a) Define following.
1) Byte code
2) Java Virtual Machine
3) Unicode
03
(b) Write a program which takes five numbers as command line
argument from user, store them in one dimensional array and
display count of negative numbers.
04
(c) What do you mean by Interface? Compare interface and abstract
class with suitable example.
07

Q.2 (a) When will you declare a method as a static? Explain static method
with suitable example.
03
(b) Explain inner class with example. 04
(c) Explain following keywords of java with example.
1) final
2) finally
07
OR
(c) Explain following keywords of java with example.
1) super
2) this
07
Q.3 (a) What is java collection framework? What are the benefits of the
java collection framework?
03
(b) What is Exception? Demonstrate how you can handle different
types of exception separately.
04
(c) What is dynamic method dispatch? Explain with suitable
example.
07
OR
Q.3 (a) What is wrapper class? What is the use of wrapper class in Java? 03
(b) What do you mean by Overloading? Explain constructor
overloading with suitable example.
04
(c) Explain following keywords with example
1) throw
2) throws
07
Q.4 (a) Write a program that reads file name from user, through command
line argument and displays/reads content of the text file on
console.
03
(b) What is package? What are the requirements of it? What we can
achieve using package?
04
(c) What is multithreading? What are the ways in which you can
create a thread? Explain with Example
07

www.FirstRanker.com www.FirstRanker.com
www.FirstRanker.com
www.FirstRanker.com
2
OR
Q.4 (a) Write a program that accepts name of website from user, and
displays IP address of it on console.
03
(b) What will be the output of following code snippet?
(1)
class evaluate {
public static void main(String args[])
{
int arr[] = new int[] {0 , 1, 2, 3, 4, 5, 6, 7, 8, 9};
int n = 6;
n = arr[arr[n] / 2];
System.out.println(arr[n] / 2);
}
}
(2)
class equality {
int x;
int y;
boolean isequal()
{
return(x == y);
}
}
class Output {
public static void main(String args[])
{
equality obj = new equality();
obj.x = 5;
obj.y = 5;
System.out.println(obj.isequal());
}
}
04
(c) Explain use of following methods with suitable example
isAlive(), join(), setPriority().
07
Q.5 (a) What is use of fork and join in activity diagram? Explain with
suitable example.
03
(b) What is UML? Explain Class Model, State Model and Interaction
Model in brief.
04
(c) Draw class diagram of bank management system. 07
OR

Q.5 (a) What is usefulness of sequence diagram? List components of it. 03
(b) Explain generalization in class diagram with example. 04
(c) Draw use case diagram for hotel management system. 07

*************
www.FirstRanker.com www.FirstRanker.com
www.FirstRanker.com
FirstRanker.com - FirstRanker's Choice

This post was last modified on 20 February 2020