Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
26 views

Practical List

Uploaded by

rvmehtaictspce
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Practical List

Uploaded by

rvmehtaictspce
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

OOPJ 1ET1070501

Practical-1

Basic java programs

1. Write a java program to find out area of rectangle, square, circle, triangle and cube.
2. Write a java program to check whether a given input number is even or odd.
3. Write a java program to find out minimum and maximum number from given input integer number.
4. Write a java program to check whether input number is Palindrome or not.
5. Write a java program to print Prime numbers between 100 to 200.
6. Write a java program to print Fibonacci series.
7. Write a java program to check whether input number is Armstrong or not.
8. Write a java program to check whether input number is Perfect or not.
9. Write a program to print the following pattern:
(i) 1 (ii) 1
2 2 1 2
3 3 3 1 2 3
4 4 4 4 1 2 3 4

Practical – 2

Programs for constructor, this and final k/w and command line argument

1. Write a java program to find out area of rectangle using parameterize and default constructor.
2. Write a java program to find out area of circle using parameterize and default constructor.
3. Write a java program to find out area of cube using this keyword.
4. Write a java program in which define constant using final keyword to find out area of cylinder.
5. Write a java program to find out even and odd numbers in which input is given from command line
argument.

Practical – 3

Programs for array, string and string buffer class

1. Write a java program in which define 10 elements integer array and print & count total number of
positive, negative and zero.
2. Write a java program in which define 10 elements integer array and arrange all the elements of
array into descending order.
3. Write a java program to perform all the string operation using string class.
4. Write a java program to perform all the string operation using string buffer class.

Practical – 4

Programs for inheritance, abstract k/w and package

1. Write a java program to perform multilevel inheritance for staff data of university.

Page 1
OOPJ 1ET1070501

2. Write a java program in which define an abstract class Shape, an abstract method area() for
subclasses rectangle, circle and square.
3. Define a package area to calculate area of square, rectangle, triangle and circle through same
package but different class concept.

Practical – 5

Programs for interface and exception handling

1. Write a java program in which create an interface for implement multiple inheritance using student
and test class to get and display student information and marks.
2. Write a java program using exception handling mechanism implement nested try statement of
arithmetic exception ArrayIndexOutofBound Exception.
3. Write a java program using exception handling mechanism to perform multiple catch block
operation.
4. Write a java program in which perform user defined exception using throw keyword.

Practical – 6

Programs for thread and I/O operation

1. Write a java program for creating thread using thread class.


2. Write a java program to perform thread operation using thread priority.
3. Write a java program to synchronize the threads acting on same object. The synchronized block in
the program can be executed by only one thread at a time.
4. Write a java program to create a thread class using Runnable interface.

Practical-7

Programs for Graphics class Methods

1. Write an applet program that displays a string. Write necessary applet tag for it.
2. Write an applet program that draw Rectangle and square and fill them.
3. Write an applet program that draw Circle and ellipse and fill them.
4. Write an applet program which explains the use of <PARAM> tag.

Practical-8
Programs for AWT class Methods and Layout

1. Write an applet code to develop simple calculator.


2. Write an applet code to develop Registration form.
3. Write an applet code to draw Scrollbar control.
4. Write an applet code that use FlowLayout.
5. Write an applet code that use GridLayout.
6. Write an applet code that use BorderLayout.

Page 2
OOPJ 1ET1070501

Practical-9

Programs for Event Handling.

1. Write a program to input two double values in text fields & perform arithmetic operations using
buttons like ‘+’, ‘-‘, ‘*’, ‘/’.
2. Develop an applet that receives three numeric values from the user & then displays the largest of
the three on the screen (Write a HTML page & test the applet).
3. Develop an applet that receives one string & display in reverse fashion (e.g. “Hello” should be
displayed “olleH”). Write HTML page & test the applet.
5. Write an applet that reads a number and displays square of the number.
4. Write a program to create an applet with one circle, three buttons red, blue, and yellow. When you
click Red button circle should fill with Red color, when press blue fills with blue, when press yellow
fills with yellow.
6. Write an applet program for Mouse event.
7. Write an applet program for keyboard event.

Page 3

You might also like