GTU SP

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Seat No.: ________ Enrolment No.

______________

GUJARAT TECHNOLOGICAL UNIVERSITY


Diploma Engineering SEMESTER 4 (NEW) EXAMINATION Summer-2023

Subject Code: 4340701 Date: 13-07-2023


Subject Name: Advanced Object Oriented Programming
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.
4. Use of programmable & communication aids are strictly prohibited.
5. Use of non-programmable scientific calculator is permitted.
6. English version is authentic.

Marks

Q.1 (a) Explain JVM. 03


( JVM
(b) List out different types of operators in Java. Explain Logical and 04
Bitwise Operators in detail.

(c) Write a program that reads an integer between 0 and 1000 and adds all 07
the digits in integer. For example if an integer is 931 then sum is 13.
JAVA 0 1000
931 13
OR
(c) Write a java program to implement Fibonacci series using Loop control 07
statement.

Q. (a) Write any four difference between procedure oriented and object 03
oriented programming language.
.2 (

(b) Define method overloading. Explain with suitable example. 04

(c) 07
chatAt(), contains(), format(), length(), split()
"String " Class
chatAt(),contains(), format(), length(), split().
OR
Q. (a) What is wrapper class ? Explain use of any one wrapper class. 03
2 ( Wrapper ? Wrapper
(b) 04
JAVA this"
(c) Write Java program using copy constructor to find area of rectangle. 07

1
Q. 3 (a) List types of inheritance available in JAVA. Explain single inheritance 03
with example.
.3 ( JAVA Inheritance
Single Inheritance
(b) Write a program in Java to demonstrate hierarchical inheritance. 04
JAVA hierarchical(

(c) Write a program in Java which has a class Car having two instance 07
variables topSpeed and name. Override toString() method in Car class.
Create 5 instances of Car class and print the instances.
JAVA Class topSpeed
name Class Car toString()
Class Car 5

OR
Q. 3 (a) Define abstract class in JAVA with example. 03
.3 ( JAVA Abstract Class
(b) Explain how to implement multiple inheritances in java through 04
interface.

(c) Create a user-defined package and demonstrate use that package in one 07
example.
JAVA

Q. 4 (a) List types of Errors in exceptional handling and explain any one of 03
them.
.

(b) Explain life cycle of Thread. 04


(
(c) Write a program in Java to develop Banking Application in which user 07
deposits the amount Rs 5000/- and then start withdrawing of Rs 2000/-,
Rs 1500/- and it throws exception "Not Sufficient Fund" when user
withdraws Rs. 3500/- thereafter.
(

OR
Q. 4 (a) Explain two techniques of creating thread in Java. 03
. JAVA
(b) Explain Try and Catch in JAVA with suitable example. 04
( JAVA
(c) Write a Java program that executes three threads. One thread displays 07

every 7500 millisecond.


2
(

Q.5 (a) Explain basics of stream classes in JAVA. 03


. JAVA
(b) Write a program in Java to create a text file and perform write operation 04
on the text file.
(

(c) Write a program in Java to demonstrate use of List. 1) Create ArrayList 07


and add weekdays (in string form) 2) Create LinkedList and add
months (in string form) Display both List.
( List 1) ArrayList
2) LinkedList
List
OR
Q.5 (a) List collection framework available in JAVA. Explain any one in brief. 03
. JAVA Collection

(b) Write a program to create a file name 123.txt, if it does not exist. 04
Append a new data to it if it already exist.
( JAVA 123.txt

(c) Write a program in Java to create a new HashSet, add colors(in string 07
form) and iterate through all elements using for-each loop to display the
collection.
(

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy