JAVA Programming Lab
Periods/week : 3 Periods . Ses. : 50 Exam : 50 Examination (Practical): 3hrs. Credits: 2
1. (a) Program to display the area of a rectangle.
(b) Program to find Sum of series 1+x+x2+x3+……
2. (a) Write a class to display the area of rectangle and inherit this class into other class which is displaying perimeter of a rectangle and implement.
(b) Write a class to add three no’s inherit this class into other class to add five no’s and implement it.
3. (a) write a program to print the path, filename and extension for a given path of a file.
(b) write a program to receive two command line arguments check whether they are equal or not.
4. (a) A program to take two arguments and divide the first argument with second argument and display the result. Display the error message if divide by zero without abnormal exit.
(b) A program to accept more than one string and arrange them in alphabetical order.
(c) Write a program to display simultaneously output of even and odd numbers starting from one to specified number.
5. Write a program to accept data from keyboard and write it into a file.
6. Write a java program to implement stack & Queue operations.
7. Write a program to draw line and circle using mouse.
8. Write a applet program for drawing the bar chart.
9. Write a applet program to design a calculator for implementing basic functions like +,-,*, /.
10. Write a program to check active ports in system.