You are on page 1of 1

JSPM’S

Jayawant Institute of Management Studies,

Subject: Core Java MCA I, Semester-II

Lab Assignments

1. Write a program to accept three strings from command line and display the length of each string.
2. Create abstract class shape, create circle and cylinder hierarchy. Display the area of fig. using
polymorphism.
3. Declare an interface called function that has method name evaluate, that takes an int. parameter
and returns an integer value. Create a class called half that implements the above interface. The
implementation of the method evaluate should return the value obtained by dividing the integer
arguments by 2.
4. Write class student and store it into a package. Write a class batch with information about subject,
faculty and timing. Store it in package bat. Use batch class to set information in student class.
5. Write a program to create try block to create three types of exception and then incorporate
necessary catch blocks to catch and handle them.
6. Write a program to implement finally block.
7. Write a program to accept two integers from user using different text box and display addition,
subtraction, multiplication and division in separate text boxes using applet.
8. Write a program to scroll car image from left to right. When the color of signal changes to red, the
image should stop scrolling.
9. Write a program to create thread and use getPriority and setPriority methods.
10. Write a program to implement join method.
11. Write an applet to display welcome message after every 5 sec. increase the font size by 2 pts.
12. Write an applet for implementing cut copy and paste function.
13. Write an applet that contains two labels and two buttons organized in two rows. Each row should
start with a label followed by a button.
14. Write an applet that contains one label and one button. When the user clicks the button the
associated label should reverse its text. Clicking on button should reverse the text again back to its
original form.
15. Write a program to copy alternate char from one file into another.
16. Write a program to count no of words and lines into a file.
17. Write a program to copy contents of source file to target file by removing comment lines from
source file.
18. Write a program to search given word in file also display no. of occurrences in file. Accept the
word to user from command line.
19. Write a program to merge two file into third file.
20. Write a program to create directory jims/mca store file java.txt into mca.
21. Write a program to insert record for employee in to file emp.dat. The fields are id, salary.
22. Write a program to count a number of records into file.
23. Write a program to accept record no. from user and display that record in screen.

Prof. Shweta Padale


Subject Teacher

You might also like