This download link is referred from the post: GTU BE/B.Tech 2018 Winter Question Papers || Gujarat Technological University
GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER-V (NEW) EXAMINATION - WINTER 2018
--- Content provided by FirstRanker.com ---
Subject Code:2150704 Date:11/12/2018Subject Name:Object Oriented Programming using JAVA
Time: 10:30 AM TO 01:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
--- Content provided by FirstRanker.com ---
2. Make suitable assumptions wherever necessary.3. Figures to the right indicate full marks.
MARKS
Q.1 (a) Define following. 03
1) Byte code
--- Content provided by FirstRanker.com ---
2) Java Virtual Machine3) Unicode
(b) Write a program which takes five numbers as command line 04
argument from user, store them in one dimensional array and
display count of negative numbers.
--- Content provided by FirstRanker.com ---
(c) What do you mean by Interface? Compare interface and abstract 07
class with suitable example.
Q.2 (a) When will you declare a method as a static? Explain static method 03
with suitable example.
(b) Explain inner class with example. 04
--- Content provided by FirstRanker.com ---
(c) Explain following keywords of java with example. 07
1) final
2) finally
OR
(c) Explain following keywords of java with example. 07
--- Content provided by FirstRanker.com ---
1) super2) this
Q.3 (a) What is java collection framework? What are the benefits of the 03
java collection framework?
(b) What is Exception?. Demonstrate how you can handle different 04
--- Content provided by FirstRanker.com ---
types of exception separately.(c) What is dynamic method dispatch? Explain with suitable 07
example.
OR
Q.3 (a) What is wrapper class? What is the use of wrapper class in Java? 03
--- Content provided by FirstRanker.com ---
(b) What do you mean by Overloading? Explain constructor 04
overloading with suitable example.
(c) Explain following keywords with example 07
1) throw
2) throws
--- Content provided by FirstRanker.com ---
Q.4 (a) Write a program that reads file name from user, through command 03
line argument and displays/reads content of the text file on
console.
(b) What is package? What are the requirements of it? What we can 04
achieve using package?
--- Content provided by FirstRanker.com ---
(c) What is multithreading? What are the ways in which you can 07
create a thread? Explain with Example
Q.4 (a) Write a program that accepts name of website from user, and 03
displays IP address of it on console.
(b) What will be the output of following code snippet? 04
--- Content provided by FirstRanker.com ---
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;
--- Content provided by FirstRanker.com ---
n = arr[arr[n] / 2];System.out.println(arr[n] / 2);
}
}
(c) class equality { 07
--- Content provided by FirstRanker.com ---
int X;int y;
boolean isequal()
{
return(x ==y);
--- Content provided by FirstRanker.com ---
}}
class Output {
public static void main(String args[])
{
--- Content provided by FirstRanker.com ---
equality obj = new equality();obj.x =5;
obj.y=5;
System.out.println(obj.isequal());
}
--- Content provided by FirstRanker.com ---
}Q.5 (a) Explain use of following methods with suitable example 03
isAlive(), join(), setPriority().
(b) What is use of fork and-join in activity diagram? Explain with 04
suitable example.
--- Content provided by FirstRanker.com ---
(c) What is UML? Explain Class Model, State Model and Interaction 07
Model in brief.
OR
Q.5 (a) Draw class diagram of bank management system. 03
(b) What is usefulness of sequence diagram? List components of it. 04
--- Content provided by FirstRanker.com ---
(c) Explain generalization in class diagram with example. 07
Draw use case diagram for hotel management system.
--- Content provided by FirstRanker.com ---
This download link is referred from the post: GTU BE/B.Tech 2018 Winter Question Papers || Gujarat Technological University