Documente Academic
Documente Profesional
Documente Cultură
Prerequisite: none
Content:
Note: This specification table shall be treated as a general guideline for students and teachers. The actual
distribution of marks in the question paper may vary slightly from above table.
Reference Books:
1) Java Fundamentals A comprehensive introduction By Herbert Schildt, Dale Skrien, McGraw Hill
Education.
2) Programming with Java A Primer – E.Balaguruswamy,Mc Grawhill
3) The Complete Reference, Java 2 (Fourth Edition),Herbert Schild, - TMH.
4) Core Java Volume-I Fundamentals Horstmann & Cornell, - Pearson Education. - Eight Edition
5) Object Oriented Modeling and Design with UML
Michael Blaha and James Rambaugh – PEARSON second edition
6) UML Distilled: A Brief Guide to the Standard Object Modeling Language (3rd Edition) by Martin
Fowler
Course Outcome:
List of Experiments:
Major Equipment:
Computer ,Laptop
2
(b) Prepare a class model to describe undirected graph. An 04
undirected graph consists of a set of vertices and a set of edges.
Edges connect pairs of vertices. Your model should capture only
structure of graphs (i.e. connectivity) and need not be concerned
with layout such as location of vertices or lengths of edges.
(c) Explain activity diagram with the help of an example. 07
OR
Q.5 (a) Explain Metadata with the help of an example. 03
(b) Construct state diagram for a telephone line. 04
(c) Explain sequence diagram with the help of an example. 07
*************
3
Seat No.: ________ Enrolment No.___________
*************
1
Seat No.: ________ Enrolment No.___________
Q.1 (a) Write a program that creates and initializes a four integer 07
element array. Calculate and display the average of its
values.
(b) Write a java program to do sum of command line argument 07
passed two Double numbers.
Q.2 (a) Define time class with hour and minute. Also define 07
addition method to add two time objects.
(b) Explain use of Linked List collection class with example. 07
OR
(b) Write a program to create circle class with area function to 07
find area of circle.
Q.5 (a) Draw use case diagram for Library Management System. 07
(b) Draw class diagram for online restaurant system. 07
OR
Q.5 (a) Draw sequence diagram for book issue process of library. 07
(b) Draw class diagram for ATM. 07
*************
1
Seat No.: ________ Enrolment No.___________
Q.1 (a) What is Thread? Draw and explain life cycle of thread. 07
(b) Explain Runtime Polymorphism with example 07
Q.2 (a) Explain inheritance with its types and example. 07
(b) Write a java program to print prime number upto 100. 07
OR
(b) Write a java program which check whether entered number is prime or 07
not ?
Q.3 (a) What is package? List various built in package used in java. 07
(b) Read employee salary and calculate the income tax based on 10% of 07
income and store it in tax.txt file for five different employees.
OR
Q.3 (a) What is collection in Java? Differentiate between Vector and Array List. 07
(b) Name three types of layout managers and briefly explain their operations. 07
Q.4 (a) Discuss public, private, protected and default access modifier with 07
example.
(b) Explain following key words: this, super, instance of, static. 07
OR
Q.4 (a) Write a java program which read numbers from number.txt file and store 07
even number to even.txt and odd number into odd.txt file.
(b) What is an Exception? Explain Exception handling in JAVA. 07
Q.5 (a) Write a java network example to print server date and time on client 07
machine.
(b) Differentiate Abstract class and interface with suitable example. 07
OR
Q.5 (a) Write an application that read limit from user and executes two threads. 07
One thread displays total of first n even numbers & another thread
displays total of first n odd numbers. Create the threads by implementing
the Runnable interface.
(b) Write a program to check that whether the name given from command line 07
is file or not? If it is a file then print the size of file and if it is directory then
it should display the name of all files in it.
*************
1
Seat No.: ________ Enrolment No.___________
Q.1 (a) Explain use of final, static and super keyword by giving examples. 07
(b) Explain method overriding and method overloading with the help of 07
examples.
Q.2 (a) Explain : Abstract Class and Interface with example. Compare Both. 07
(b) Differentiate the followings: 07
i) Applet and Application
ii) String class and StringBuffer class
iii) Constructor and Method
OR
(b) Define generics in java. Write a program to demonstrate generic 07
interface and generic method.
Q.3 (a) What is collection in Java? Differentiate between Vector and ArrayList. 07
(b) What is Wrapper class in Java? Explain with examples. 07
OR
Q.3 (a) Draw and explain lifecycle of Applet. 07
(b) Explain wait, notify, notifyall, synchronized methods in thread. 07
Q.4 (a) Draw and explain life cycle of Thread. Also list and explain various 07
methods of thread.
(b) What is package? Explain steps to create package with example. 07
OR
Q.4 (a) What is inheritance in java? Explain different types of inheritance with 07
proper example partial code.
(b) 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 area
for specific class’ object.
Q.5 (a) What is Exception? Explain various Built-in exceptions in java. Also 07
give difference between throw and throws keywords.
(b) Write a Java program to copy content of file1.txt to file2.txt using Java 07
file handling.
OR
Q.5 (a) Explain Event Handling in java and describe methods of mouse event 07
and key event.
(b) Write a program to create two threads, one thread will print odd 07
numbers and second thread will print even numbers between 1 to 100
numbers.
*************
1/1
Seat No.: ________ Enrolment No.___________
*************
2
Seat No.: ________ Enrolment No.___________
Q.1 (a) List various features of Java? Also explain any two feature with example. 07
(b) Compare Object oriented programming with sequential programming. 07
Q.2 (a) What is visibility modifier? Explain all with example. 07
(b) What is package? List various built in package used in java. 07
OR
(b) What is Thread? Draw and explain life cycle of thread. 07
Q.3 (a) Write a program which shows an example of function overloading? 07
(b) What is error? Explain various types of errors. How can we handle run time 07
errors in java?
OR
Q.3 (a) Write a program which shows an example of function overriding? 07
(b) Compare String with StringBuffer class. 07
Q.4 (a) What is variable? How can we define variable in java? Also list rules for valid 07
variable names.
(b) What is constructor? What are the rules for creating constructor in java? 07
OR
Q.4 (a) Explain inheritance with its types and example. 07
(b) How interface are useful in java? Explain with example. 07
Q.5 (a) What are final class, final function and final variable in java? Explain with 07
example.
(b) Explain following key words: this, super, instance of 07
OR
Q.5 (a) Compare Java Applets with application programs. 07
(b) How can we open and read a text file in java? Explain your answer with 07
example.
*************
1
Seat No.: ________ Enrolment No.___________
Figure 1
OR
(b) Write a program that illustrates interface inheritance. Interface A is extended 07
by A1 and A2. Interface A12 inherits from both P1 and P2.Each interface
declares one constant and one method. Class B implements A12.Instantiate B
and invoke each of its methods. Each method displays one of the constants
Q.3 (a) What are the benefits of using generic types? 03
(b) Differentiate between abstract class and interface. 04
(c) Discuss public, private, protected and default access modifier with example. 07
OR
Q.3 (a) What is collection in Java? Differentiate between Vector and Array List. 07
(b) Justify statement. 07
(i) JVM is platform dependent.
(ii) There is no destructor in Java.
1
Q.4 (a) Write a simple GUI application that traces the user’s action such 07
Keyboard action.
(b) Write a program to replace all “word1” by “word2” from a file1, and output is 07
written to file2 file and display the no. of replacement.
OR
Q.4 (a) Create an applet which has a Text Field to accept a URL string, and displays 07
the document of the URL string in a new browser window.
(b) Differentiate String class and StringBuffer class with explanation of its 07
methods.
Q.5 (a) Write a program to create two threads, one thread will print odd numbers and 07
second thread will print even numbers between 1 to 20 numbers.
(b) Write a program that counts number of characters, words, and lines in a file. 07
Use exceptions to check whether the file that is read exists or not.
OR
Q.5 (a) Explain the following terms with respect to exception handling. 07
i) try ii) catch iii) throw iv) finally
(b) What is a thread? Describe the complete life cycle of thread with example. 07
*************
2
Seat No.: ________ Enrolment No.___________
*************
1
Seat No.: ________ Enrolment No.___________
Q.2 (a) Explain constructor and finalizer with the help of example. 07
(b) Compare String with StringBuffer. Also write a program to count occurrence 07
of character in a string.
OR
(b) Compare List, Set and Map interfaces. Also compare ArrayList, TreeSet and 07
HashMap classes in java.
Q.5 (a) What is Exception? Give some of Built-in exceptions in java. Also give difference 07
between throw and throws.
(b) Write an application that creates and starts three threads. Each thread is instantiated 07
from the same class. It executes a loop with 10 iterations. Each iteration displays
string "HELLO", sleeps for 300 milliseconds. The application waits for all the threads
to complete & displays the message "Good Bye...".
OR
Q.5 (a) What is package? Explain steps to create package with example. 07
(b) Write an application that executes two threads. One thread displays "Good Morning" 07
every 1000 milliseconds & another thread displays "Good Afternoon" every 3000
milliseconds. Create the threads by implementing the Runnable interface.
*************
1
Seat No.: ________ Enrolment No.___________
Q.1 (a) List OOP characteristics and describe inheritance with examples. 07
(b) Explain & illustrate by examples use of final, finally and method finalize. 07
Q.3 (a) Declare a class called book having author_name as private data 07
member. Extend book class to have two sub classes called
book_publication & paper_publication.
Each of these classes have private member called title. Write a complete
program to show usage of dynamic method dispatch (dynamic
polymorphism) to display book or paper publications of given author.
Use command line arguments for inputting data.
(b) (i) Explain super, instanceof and volatile. 07
(ii) Compare byte streams and character streams.
OR
Q.3 (a) It is required to compute SPI (semester performance index) of n 07
students of your college for their registered subjects in a semester.
Declare a class called student having following data members:
id_no , no_of_subjects_registered, subject_code , subject_credits,
grade_obtained and spi.
- Define constructor and calculate_spi methods.
- Define main to instantiate an array for objects of class student to
process data of n students to be given as command line
arguments.
(b) (i) JVM is platform dependent. Justify. 07
(ii) There is no destructor in Java. Justify.
Q.4 (a) Write a complete GUI based program to implement a queue of strings 07
in an applet. Select components and layout of your choice.
1/2
Q.4 (b) (i) Illustrate by example – generic programming. 07
(ii) Explain interface and its usage.
OR
Q.4 (a) Write a complete program to have a GUI based simple calculator in a 07
frame supporting addition & subtraction. There are buttons for 0 to 9
digits and for arithmetic operations. Select layout of your choice.
(b) Explain 07
(i) card layout
(ii) utility class Hashtable with example.
*************
2/2