You are on page 1of 3

Ahmedabad Institute of Technology

CE & IT Department

Object Oriented Programming-I (3140705)

Question- Answer Assignment

Assignment -1 (Write any 20 Questions out of 30) -20 Marks


1 Explain features of JAVA 7
2 Compare ii) String class and StringBuffer class. 7
3 Explain the use of BigInteger and BigDecimal with the help of programs. 7
4 Write a java program to do sum of command line argument passed two 7
Double numbers.
5 What is Wrapper class in Java? Explain with examples. 7
6 What is constructor? What are the rules for creating constructor in 7
java?Explain constructor overloading using example.
7 Differentiate Method Overloading and Method Overriding with example. 7
8 Explain Java garbage collection mechanism. 7
9 Explain static,this,final keyword 7
10 Discuss public, private, protected and default access modifier with example. 7
11 Explain garbage collection and finalize method in JAVA 7
12 Write a program to create circle class with area function to find area of circle. 7
13 Dynamic Method Dispatch with example. 7
14 Explain inheritance with its types and example. 7
15 Explain keywords - super, this, final.throws . 7
16 Differentiate between abstract class and Interface 7
17 The abstract Vegetable class has three subclasses named Potato, Brinjal and 7
Tomato. Write an application that demonstrates how to establish this class
hierarchy. Declare one instance variable of type String that indicates the color
of a vegetable. Create and display instances of these objects. Override the
toString() method of Object to return a string with the name of the vegetable
and its color.
18 Describe abstract class called Shape which has three sub classes say Triangle, 7
Rectangle,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 etc. Same for Rectangle and
Circle
19 The Transport interface declares a deliver() method. The abstract class Animal 7
is the superclass of the Tiger, Camel, Deer and Donkey classes. The Transport
interface is implemented by the Camel and Donkey classes. Write a test
program that initialize an array of four Animal objects. If the object
implements the Transport interface, the eliver() method is invoked
20 Explain package in java. List out all packages with short description. 7
21 Explain & illustrate by examples use of final, finally and method finalize 7
22 Explain the importance of Exception handling in java. Write a program to 7
handle
NoSuchMethodException, ArrayIndexOutofBoundsException using try-catch-
finally and throw.
23 Enlist and explain the difference between error and exception. Write a 7
program to handle InterruptedException, IllegalArgumentException using try-
cat-finally and throw
24 Explain Exception handling in JAVA. Write an application that generates 7
custom exception if any value from its command line arguments is negative.
25 Draw and explain life cycle of thread. Also list and explain various methods of 7
thread.
26 Explain thread Synchronization with join() and isAlive() methods. 7
27 Write a program using BufferedInputStream, FileInputStream, 7
BufferedOutputStream,FileOutputStream to copy Content of one file File1.txt
into another file File2.txt.
28 Explain the basic structure of JavaFX program with suitable example. 7
29 What is HBox layout pane? Elaborate its constructors, methods and example. 7
30 Explain with examples, how to add audio and video in javaFX application. 7

Prof. Shital Patel Dr. Ajay N. Upadhayaya


Assistant Professor, IT Dept., AIT HOD CE & IT Dept., AIT

You might also like