B.tech III Sem OOPS Model Paper
B.tech III Sem OOPS Model Paper
B.tech III Sem OOPS Model Paper
(Autonomous)
Model Question Paper
Four Year B.Tech III SEMESTER Regular Examination
(Regulation VCE-R11)
Course Code: ACS11T04
Unit 1:
1. a. Discuss the features of java and how they differ in viewing world. (8 M)
b.Input a paragraph containing n number of sentences where (1 = < n <
4). The words are to be separated with a single blank space and are in
UPPERCASE. A sentence may be terminated either with a full stop . Or a
question mark ? only. Any other character may be ignored. Perform the
following operations:
i. Accept the number of sentences. If the number of sentences
exceeds the limit,
an appropriate error message must be displayed.
ii. Find the number of words in the whole paragraph.
2. a. Write a program to accept the names of 10 cities in a single dimension
string array and their STD codes in another single dimension integer array.
Search for a name of a city input by the user in the list. If found, display
search successful and print the name of the city along with its STD code,
or else display the message search unsuccessful, no such city in the list.
(8 M)
b. An array is initialized with n integers. You are required to write a java
program to locate all zeros in this array and shift them to the left.
Remember that the order of other numbers should not be change in the
array (7 M)
Unit 2:
3. a. Design a class to overload a function polygon() as follows
i.
void polygon(int n, char ch) : with one integer argument and
one character type argument that draws a filled square of side
n using the character stored in ch.
ii.
void polygon(int x, int y) : with two integer arguments that
draws a filled rectangle of length x and breadth y, using the
symbol @
iii.
void polygon() : with no argument that draws a filled triangle
shown below: (8M)
10.a. Write the Java applet that contains a textbox for accepting Student Id
and
a
button
"View Details". Single click on the button will display the details of the
corresponding
Student (Name, Course, Semester and Address) in text boxes from a
database.
b. Create a JTable and JScrollPane object and add JScrollPane to table and
the argument to the constructor specify the table and policies for vertical
and horizontal scrollbar. Now add the scroll pane to the content pane of an
applet.