253 Java
253 Java
253 Java
TECHNOLOGY
(Affiliated To GGSIP University)
List of Practical
Java Programming
MCA-253
1.) Write a program that will display the message Weight of bundle5Kgs in a constructor and display the weight in kilograms and grams.
2.) Write a Java Program that will contain two Arrays. In the First array
store the following:
a. Chips
b. Apples
c. Mangoes
d. Towels
e. Room Freshner
f. Hangers
g. Pens
h. CornFlakes
i. Oats
And Store the following price of each product in the second Array:
a.
b.
c.
d.
e.
f.
g.
h.
i.
10
20
40
400
400
150
50
20
25
Write a method that will display the products with their corresponding
prices.
3.) Write a Java Program to display a four by four identity matrix.
4.) Write a Java Program to :
a. Test equality between two strings
(i)
(ii)
Implement the stack with the help of arrays and if the size of the array
becomes too small to hold the elements, create a new one. Test this
interface by inheriting it in its subclass StackTest.java.
15.Write a Program to accept two parameters on the command line. If
there are no command line arguments entered, the program should
print error message and exit. The program should check if the first file
exists. If so the contents of the file should be copied to the second file.
In case the first parameter is a directory, print message accordingly
and exit. Appropriate error messages should be displayed at all points.
16.Write a program to implement a word count utility, which should
display the count of characters, words and lines. Input can be a disk
file or data read from console.
17.Create an integer array to contain ten numbers Using
RandomAccessFile, Write the array into a file called rand.dat. The
program should read the contents of the rand.dat file backwards. Make
use of try/catch and finally clauses.
24.Write a program to display the current data and time. The program
should also determine whether the current year is leap year or not. Use
GregorianCalendar Class.
25.Create an applet to obtain a figure as :
1.) The background color for the applet should be set as white.
2.) The text should be written in Helvetica font, style should be
bold and size should be 20. The color of the text should be
black.
3.) Make a Man with head in red color, the body in orange, hands
in green and legs in blue.
26.Write an applet that creates a working version of Fifteen Puzzle The
Puzzle contains a grid with four rows and four columns. The cells of
the grid are filled with numbers from 1 to 15, leaving one cell empty.
On Clicking the mouse on a cell adjacent to the empty cell, the
number in the cell moves to the empty cells. The puzzle is completed
when the user manages the numbers in the cells in ascending order.
27.Write an animation applet that makes an image appear from left to
right, in stages.
28.Create an applet that lets the user adjust the background color, Provide
three scrollbars in your applet, one each for the three base colors, red,
green and blue.
Datatype
Description
ShareId
Number(3)
CompName
NoOfShares
Varchar2(20)
Number(4)
PurRate
Number(6,2)
PurDate
Date
CurrRate
Number(6,2)
Details Table
Column
Datatype
Description
ShareId
Number(3)
CertNo
NoOfShares
Varchar2(10)
Number(3)
FirstHolder
Varchar2(15)
SecondHolder
Varchar2(15)
SecondHolder
Varchar2(15)