Download GTU B.Tech 2020 Summer 4th Sem 3140705 Object Oriented Programming I Question Paper

Download GTU (Gujarat Technological University Ahmedabad) B.Tech/BE (Bachelor of Technology/ Bachelor of Engineering) 2020 Summer 4th Sem 3140705 Object Oriented Programming I Previous Question Paper

Seat No.: ________
Enrolment No.___________


GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER? IV EXAMINATION ? SUMMER 2020
Subject Code: 3140705 Date:26/10/2020
Subject Name: Object Oriented Programming -I
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) Explain JRE, JDK and JIT.
03

(b) Explain static keyword with example.
04

(c) Explain inheritance with its types and give suitable example.
07


Q.2 (a) Compare object-oriented programming with sequential programming.
03

(b) Method main is a public static method. Justify
04

(c) Write a program, which shows an example of function overloading.
07
Also, differentiate between function overloading and overriding.


OR


(c) Write a program to take string input as command line argument. In
07
addition, count occurrence of each character in a given string.
Q.3 (a) Write difference between String class and StringBuffer class.
03

(b) Explain super keyword with example.
04

(c) Describe abstract class called Shape, which has three subclasses say
07
Triangle, Rectangle, and Circle. Define one method area() in the abstract
class and override this area() in these three subclasses to calculate for
specific object i.e. area() of Triangle subclass should calculate area of
triangle likewise for Rectangle and Circle.


OR

Q.3 (a) How can we protect sub class to override the method of super class?
03
Explain with example.

(b) Define Interface and explain how it differs from the class.
04

(c) What do you mean by run time polymorphism? Write a program to
07
demonstrate run time polymorphism.
Q.4 (a) Differentiate between Text I/O and Binary I/O.
03

(b) Explain ArrayList class.
04

(c) What is an Exception? List out various built-in exceptions in JAVA and
07
explain any one Exception class with suitable example.

OR

Q.4 (a) How do y
ou declare a generic type in a class? Explain.
03

(b) Write a JAVA program to read student.txt file and display the content.
04

(c) Explain Thread life cycle in detail. Write a program to create a child
07
thread to print integer numbers 1 to 10.
Q.5 (a) Explain in brief: Color class and its methods.
03

(b) What method do you use to obtain an element in the collection from an
04
iterator? Explain with example.

(c) Enlist various layout panes and explain any two in detail.
07


OR
Q.5 (a) Compare Set and List interfaces.
03
(b) Write importance of JAVAFX compare to AWT and Swing.
04
(c) How do you create a Scene object? How do you set a scene in a stage?
07
Is it possible to create multiple scenes? Write a program to place a circle
in the scene and fill circle with red color.


1


This post was last modified on 04 March 2021