Semester : SEMESTER 2
Subject : Object Oriented Programming
Year : 2017
Term : APRIL
Branch : MCA
Scheme : 2016 Full Time
Course Code : RLMCA 102
Page:2
12.
13.
14.
15.
16.
17.
18.
19.
20
C2A002 Pages:2
Design classes Square, Right Triangle and Triangle that encapsulates three geometric
shapes. Each class should implement an abstract method void draw (int x, int y) that
draws a square, a right triangle or an equilateral triangle pattern respectively. Each shape
consists of drawing characters ‘*’, ‘%’ and “ரீ? respectively. Variables x and y represents
the number of characters along horizontal and vertical directions respectively.
MODULE - 1
Explain the steps of adding classes to a package with an example.
OR
Explain the different levels of access protection available for packages in Java
MODULE - IV
a. Differentiate between throw and throws keywords used in exception handling through
proper code fragments. (4)
b. Define Daemon threads. Give an example. How can you change a thread to
Daemon? (2)
OR
Explain the life cycle of a thread with a suitable diagram.
MODULE -۷
Explain with a program how data can be read from and written/append to a Random
Access File.
OR
a) Write a Java program to copy characters from one file to another? (4)
b. Explain the merits of using BufferedReader over FileReader in reading characters
from a file. (2)
MODULE - VI
Write a Java program to send two numbers from clientclass calculate the sum at the
server and send it back to the client.
OR
. a) Differentiate between applets and application. (2)
b. Write an applet to find and display the sum of two numbers such that the numbers
are passed from the webpage as parameters to the applet. (4) ***
Page 2 of 2