T.Y. [Link].
COMPUTER SCIENCE
CS-355: Object Oriented Programming using Java – I
Q1) Attempt any Eight of the following : [8 × 1 = 8]
a) What is javadoc?
b) What are command line argument?
c) Define Constructor.
d) List any two wrapper classes.
e) Write the use of extends key word.
f) Define functional interface.
g) List any two uncheck exception.
h) How to open file in read mode?
i) What is AWT?
j) Give the names of any two Adaptor class.
Q2) Attempt any FOUR of the following : [4 × 2 = 8]
a) Differentiate between String and StringBuffer class.
b) State any four features of java.
c) What is polymorphism? How to implement it at compile time?
d) How to define and handle user defined exception?
e) What is listener? How to inherit it in program?
Q3) Attempt any TWO of the following : [2 × 4 = 8]
a) Write a java program to copy the content from one file to another file,
while copying change the case of alphabets.
b) Write a java program using swing to accept details of employee (eno,
ename, esal) and display it by clicking on a button.
c) Define abstract class shape with abstract method area (). Write a java
program to calculate area of circle.
Q4) Attempt any Two of the following : [2 × 4 = 8]
a) Write a java program to give Red colour at the background of TextField
by clicking on a button.
b) Explain the uses of super keyword with example.
c) What is string? Explain its any three method with an example.
Q5) Attempt any ONE of the following : [1 × 3 = 3]
a) Explain the execution process of java program.
b) Explain MVC architecture in details
SPPU QUESTION PAPER 2
Q1) Attempt any EIGHT of the following : (out of ten) [8 × 1 = 8]
a) What is use of Javac?
b) Give the name of any two wrapper classes.
c) What is use of 'implements' keyword?
d) List types of constructor.
e) What is use of Array?
f) Give the name of any two listeners.
g) What is exception?
h) Give the syntax of ends with( ) method?
i) What is package?
j) What is use of new operator?
Q2) Attempt any FOUR of the following. (Out of Five) [4 × 2 = 8]
a) 'When constructor of class will be called?' Comment.
b) What is command line argument? Where they are stored in a program.
c) What is Frame? Give its any two methods.
d) Differentiate between method overloading and method overriding.
e) Write any two access specifiers.
Q3) Attempt any two of the following. (Out of Three) [2 × 4 = 8]
a) Define an interface shape with abstract method area( ). Inherit interface
shape into the class [Link] a Java Program to calculate area of
Triangle.
c) Write a Java Program to copy the contents form one file into another file.
While copying, change the case of cell the alphabets & replace all the
digital by '*'.
Q4) Attempt any two of the following. (out of Three) [2 × 4 = 8]
a) Differentiate between AWT & Swing.
b) Define user define exception zeronumber Exc. Write a Java program to
accept a number from user. If it is zero then throw user define exception
"Number is zero" otherwise calculate the sum of first & last digit of
given number. (use Static Keyword).
c) Write a Java program to accept n number from user & store only perfect
numbers into array & display that array.
Q5) Attempt any ONE of the following. (out of Two) [1×3=3]
a) Explain uses of final keyword with example.
b) Define a class Emp with a member Eid and display() method, inherit
EmP class into the Emp Name class, Emp Name class having a member
Ename & display ( ) method. Write a Java program to accept details of
employee [Eid, Ename] & display it. (Use super keyword).
SPPU QUESTION PAPER 3
Q1) Attempt any EIGHT of the following : [8 × 1 = 8]
a) Define exception
b) Define Interface
c) What is javadoc?
d) What is AWT?
e) What is use of static keyword?
f) What is command line argument?
g) List the types of constructor.
h) What is package?
i) How to open a file in read mode?
j) List any two listener.
Q2) Attempt any FOUR of the following : [4 × 2 = 8]
a) List any two methods of string buffer class.
b) What is use of 'throw' keyword.
c) Differentiate between final and finally keyword.
d) What is method overloading?
e) What is anonymous inner class?
Q3) Attempt any two of the following. (Out of Three) [2 × 4 = 8]
a) Define an interface shape with abstract method area( ). Inherit interface
shape into the class [Link] a Java Program to calculate area of
Triangle.
b) Design the following screen by using swing.
Student details – ×
Roll No.
Name
Percentage
Display Clear
Write a Java program to accept the details of student & display an console
by clicking on Display button. Clear button should clear all the controls.
c) Write a Java Program to copy the contents form one file into another file.
While copying, change the case of cell the alphabets & replace all the
digital by '*'.
Q4) Attempt any two of the following. (out of Three) [2 × 4 = 8]
a) Differentiate between AWT & Swing.
b) Define user define exception zeronumber Exc. Write a Java program to
accept a number from user. If it is zero then throw user define exception
"Number is zero" otherwise calculate the sum of first & last digit ofgiven number.
(use Static Keyword).
c) Write a Java program to accept n number from user & store only perfect
numbers into array & display that array.
Q5) Attempt any ONE of the following. (out of Two) [1×3=3]
a) Explain uses of final keyword with example.
b) Define a class Emp with a member Eid and display() method, inherit
EmP class into the Emp Name class, Emp Name class having a member
Ename & display ( ) method. Write a Java program to accept details of
employee [Eid, Ename] & display it. (Use super keyword).
SPPU QUESTION PAPER 4
Q1) Attempt any EIGHT of the following: [8×1=8]
a) A final keyword can not be overriden state true/false and justify.
b) Give the types of access specifiers.
c) Differentiate between Scanner and Buffered Reader class.
d) What is Layout Manager?
e) Write the purpose of this keyword.
f) List any two types of checked Exception.
g) What is listener ? State any two Listeners.
h) What are command line arguments?
i) Differentiate between throw and throws keyword.
j) Write the purpose of jab.
Q2) Attempt any FOUR of the following: [4×2=8]
a) What is constructor? List its types.
b) Differentiate between class variables and instance variables.
c) Write the purpose of abstract keyword.
d) Which class and interface are at topmost position in Exception hierarchy.
e) Give the syntax of J File Chooser class.
Q3) Attempt any TWO of the following: [2×4=8]
a) Write a java program to delete the files having extension. txt. (Use
command line arguments)
b) Write a java program using swing to accept the details of project (PID, P
Name, duration) from user and display it by clicking on a button.
c) Define an abstract class Shape with abstract method area ( ). Write a java
program to calculate area of Triangle.
Q4) Attempt any TWO of the following: [2×4=8]
a) Write a java program to change the text color of Lable to Red by clicking
on a button.
b) What is inheritance? Explain multilevel inheritance with an example.
c) How to create and access package in a program? Explain with an example.
Q5) Attempt any ONE of the following: [1×3=3]
a) Explain the structure of java program.
b) Explain different types of Dialog Box with an example.