0% found this document useful (0 votes)
31 views9 pages

Java OOP Concepts and Programming Tasks

Pyq

Uploaded by

ritikaannam05
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views9 pages

Java OOP Concepts and Programming Tasks

Pyq

Uploaded by

ritikaannam05
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Total No. of Questions : 5] SEAT No.

P5153 [Total No. of Pages : 2


[5823]-505
T.Y. [Link]. (Computer Science)
CS-355 : Object Oriented Programming Using Java - I
(2019 Pattern) (CBCS) (Semester - V) (Paper - V)

Time : 2 Hours] [Max. Marks : 35


Instructions to the candidates:
1) All questions are compulsory.
2) Figures to the right indicate full marks.

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?
P.T.O.
Q3) Attempt any TWO of the following : [2 × 4 = 8]
a) Write a Java program using AWT to change background color of
table to 'RED' by clicking on button.
b) Write a Java program to copy content from one file into another file,
while copying digits are replaced by '*'.
c) Define an interface shape with abstract method area( ). Write a Java
program to calculate area of rectangle.

Q4) Attempt any TWO of the following : [2 × 4 = 8]


a) Write a Java program to accept a number from user. If it is zero then
throw user defined exception "Number is zero". Otherwise calculate
its factorial.
b) Explain uses of super-keyword with suitable example.
c) Differentiate between AWT and swing.

Q5) Attempt any ONE of the following : [1 × 3 = 3]


a) Write a Java program to count number of vowels from given string.
b) Explain the features of Java.



[5823]-505 2
Total No. of Questions : 5] SEAT No. :
P6394 [Total No. of Pages : 2
[6155]-55
[Link].
COMPUTER SCIENCE
CS - 355 : Object Oriented Programming Using Java - I
(Revised 2019) (CBCS) (Semester - V) (Paper - V)

Time : 2 Hours] [Max. Marks : 35


Instructions to the candidates:
1) All questions are compulsory.
2) Figures to the right indicate full marks.

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.

P.T.O.
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.



[6155]-55 2
i./
-
t/ 5

Total No. of Questions : 5l


SEAT No. :
P-1304
[Total No. of Pages :2
,,:-:
[605r -305
.,.i'j++.,,+t
.?'1tt '"
TdY.
:'i, -"''
[Link].
.: Itt

.@fl{HUTER scrENCE
cs-355: obifdFbrffited Prosramming using Java - I
(20Le Pa,ffirtn1=ff**ster - \r) (CBCS) (Paper - \r)
TIme: 2 HoursJ
Instractions ta
:I' [Msx Marks : 35

1)
\y 2) Figursq tb the right indicate
' full marks. il
i.{'
,:&
1.:,1
n-. a

l''}
Ql) Attempt any Eight of the foltowing d'* t'-,'
[8x1:8]
a) What is javadoc?
b) What are command line
".
c) "*i
Define Constructor. !.1'5uu.1*'
_,,,'.,
.- -T.:,:*1'1' ,.%
d) List any two wrappQi glerssqe,f
e) Write the use of extendsfiy word. ,
i,,,*
j.r ,

\y 0 Define functional intefrace. &" -.


,..
. .,1
'
* i,r\ -{L:i'
g) List any two uncheck exception. ;y f *s.
I "-a

#t {o'
h) How to open file in read mode ? - .;r"
-''*;5' .t-b--'
r"\
" ,\.,f
D What isAWT? .
*=tS='

r';
^
T.3*,rr' .,"

) Give the names of any two Adaptor clasBr*1 ,: ;"


il;".,1;:''"
t 'o'\'
' !1r'
PT.O.
\
\
1;#

Q2) Attempt any FOUR of the following : [4 x 2:81


a) Differentiate between String and StringBuffer class.
,1r,.

b) State any four features ofjavs.r,.*.'


'"t,,.

c) What is polymoryH*tm? How to implement it at compile time?


""',/
d) How to define a*i"H'handle user defined exception?
'is \"; 7 ti"+''

e) What is tffi"erf ,p#to inherit it in program?


.*q@*
:[Link]- /-

Q3) Attemp{g"ffi TWO of the fottbwing : [2 x 4:8]


.!*- !, 'a.

a) W;ite a jgya program to copy the content from one file to another file,
*tli" cofying change the case of alphabets. \J
b) java program using swing to accept {,gtfoi. of employee (eno,
Wrft================ir

esal) and display it by clickigg on a bti$"6n.


"nahe, 9q.
""-''l

c) Define abstract class shape wittyi


n '-t.4tt
od area 0. Write a java
program to calculate area of cir(@"
*''w7*'
{.\ I {"lt'
',.t4'
"juJ ,t*ii"'
Q4) Attempt any IWo of the foltffiirg;ry| [2 x 4 : 8l
*'{t* **- y'

a) Write a javaprogram toatve-R$ colour at the background of TextField


by clicking on a budtjt.' _"i:a"." .q+!.

*,,.".\

b) Explain the uses of super libyword with example. ia...

c) What is string? Expla!ffi its any three method with an example. ,l. !)/
*\ -
.'.$''
L'"""
85) Attempt any ONE of the following ,;#" . ' [1 x 3 : t 3]
'%-*'*' .|+
a) Explain the execution process ofjava prograrpiq.
-
,':""

b) Explain MVC architecture in details. *,#f


tr, r,"+'
-.' \
I
{l* -
L'1r *
*k ,* *F \
--,:u'
{",,.J' i

1,,..
t

[ooss1-3os
Total No. of Questions : 5] SEAT No. :

PA-1027 [Total No. of Pages : 3

[5902]-55
T.Y. [Link]. (Computer Science)
CS - 355 : OBJECT ORIENTED PROGRAMMING USING
JAVA - I
(2019 Pattern) (Semester - V)
Time : 2 Hours] [Max. Marks : 35
Instructions to the candidates:
1) All questions are compulsory.
2) Figures to the right indicate full marks.

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.

P.T.O.
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.
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 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.

[5902]-55 2
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).



[5902]-55 3

You might also like