Вы находитесь на странице: 1из 5

Vishwakarma Government Engineering College , Chandkheda OOP with Java Practical List

Practical Program Program Definition No. No.

Programs based on the concept of java program structure. 1. 1. Display Welcome to Java on console. 2. Display greatest number from three numbers. 3. To check given number is prime or not. 4. To reverse the given number. 5. Display Fibonacci series. 6. To print following output on screen. 1234321 123 321 12 21 1 1 Programs based on the concept of Array. 2. 1. To search an element from an array. 2. Sort the array in ascending order. 3. Multiplication of 3X3 matrices. 4. Print the following Pascal triangle (Hint :- using irregular multidimensional array) 1 11 121 1331 14641 Programs based on the concept of Class. 3. 1. Create a class Calculator with arithmetic functions such as addition, subtraction, multiplication, and division. 2. Create a class Time with hours, minutes, seconds as member variables and calculate sum of two Time objects. 3. Create a class which can perform following tasks using method overloading a) Addition of two float values b) Addition of two arrays. c) Addition of two Strings

Programs based on the concept of Inheritance. 4. 1. Definition of Rectangle and Volume classes are given below. Calculate Volume of Box.

R RectangleMember Data length heightMember Functions Show() B BoxMember Data WidthMember Functions B Box_volume()

2.

Definitions of Student class and Test interface are given below. Result class extends Student class and implements Test interface. Display the result and other information for students.
Student Member Data roll_no name Member Functions Show() Test Member Data test1 test2 test3 Member Functions Avg_result()

Result Member function Display_all()

3.

Consider the following class definitions. Display name of child , father and grandfather from child class.
Grandfather Data: Name Function Show() Father Data: Name Function Show() Child Data: name Function Show()

Programs based on the concept of String. 5. 1. Write an OOP to demonstrate use of following functions of String class 1) getChars() 2) equals() 3) equalsIgnoreCase() 4) startsWith() 5) endsWith() 6) subString()
2.

Write an OOP to demonstrate use of following functions of StringBuffer class 1) deleteCharAt() 2) insert() Write an OOP to sort list of strings in alphabetical order.

3.

Programs based on the concept of Exception.

6.

1. 2.

3.

To catch ArithmeticException such as division by zero To catch multiple exceptions such as ArrayIndexOutOfBoundsException , NumberFormatException, NullPointerException. To throw your own exception

Programs based on the concept of Applet. 7. 1. Write an applet to print Hello Java.
2.

Write an applet to print following shape.

3. 4. 5.

Write an applet to show message on status bar. Write an applet to display image. Write an applet to play audio-clip.

Programs based on the concept of File Handling. 8. 1. Write an OOP for copying character from one file to another. 2. Write an OOP for writing bytes to file 3. Write an OOP for reading bytes from a file 4. Write an OOP for copying bytes from one file to another.
5. 6.

Write an OOP for reading and writing primitive datatype. Write an OOP for reading and writing using a random access file.

9.

Programs based on the concept of Event Handling. 1. Write an applet to illustrate Mouse Events. 2. Write an applet to illustrate Mouse Motion Events.

Вам также может понравиться