Download GTU B.Tech 2020 Winter 5th Sem 2150704 Object Oriented Programming Using Java Question Paper

Download GTU (Gujarat Technological University Ahmedabad) B.Tech/BE (Bachelor of Technology/ Bachelor of Engineering) 2020 Winter 5th Sem 2150704 Object Oriented Programming Using Java Previous Question Paper

Seat No.: ________
Enrolment No.___________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE- SEMESTER?V (NEW) EXAMINATION ? WINTER 2020
Subject Code:2150704 Date:01/02/2021
Subject Name:Object Oriented Programming using JAVA
Time:10:30 AM TO 12:30 PM Total Marks: 56
Instructions:
1. Attempt any FOUR questions out of EIGHT questions.

2. Make suitable assumptions wherever necessary.

3. Figures to the right indicate full marks.


Q.1 (a) Why java is preferred as a programing language for Internet?
03

(b) List out and explain three main principles of object-oriented programming? 04

(c) What is UML? Briefly discuss class modeling concepts using UML 07
notations.


Q.2 (a) What are command line arguments and how are they used?
03

(b) What is the purpose of `this' and `static' keyword? Write a java program to 04
explain this.

(c) What is exception? List out and explain the keywords used to handle 07
exceptions.




Q.3 (a) What is the use of static import? Explain it giving an example.
03

(b) What are interfaces in java? How do they support polymorphism?
04

(c) What are the uses of `final' keyword? Write a java program to explain all of 07
them.




Q.4 (a) What is package? How are they created and used?
03

(b) What is garbage collection? What is the roll of finalize () in it?
04

(c) What are the uses of `super' keyword? Write a java program to explain all 07
of them.



Q.5 (a) Differentiate checked exceptions with unchecked exceptions.
03

(b) What is runnable interface? How can you use this interface in creating 04
thread?

(c) Write a java program to explain the use of File class and its methods.
07



Q.6 (a) Differentiate abstract class with interface.
03

(b) What is the purpose of ServerSocket class? Explain its important methods.
04

(c) Write a program to read the content of a file into a character array and write 07
it into another file. Get names of the files from command line.



Q.7 (a) What is Collection in Java? Explain the use of Iterator.
03

(b) Explain the following terms: Abstraction, Encapsulation, Polymorphism and 04
Inheritance.

(c) What is the purpose of State Model? Define the purpose of following terms 07
with suitable example and UML notations. i)state ii) transition iii) event iv)
guard condition



Q.8 (a) What are the wrapper classes? Explain the use of any one wrapper class.
03
(b) What is the purpose of interaction model? Identify the UML diagrams used 04
to represent this model and explain the objectives of each.
(c) Draw the sequence diagrams for the operations performed with the bank 07
account using debit card at ATM
*************
1

This post was last modified on 04 March 2021