Anirban's Personal Homepage

OOPS Laboratory Assignments


Before doing the assignments, complete the Laboratory Tutorial given here in each lab sessions.


 

Assignments

1.     Design a palindrome class in java that will input a string from the console and check whether the inputted string is a palindrome.

2.     Design a class ‘reverse’ that will reverse a string inputted from keyboard and display it in the video.

3.     Create two classes, Stud_Master having student name, roll and another class Stud_Marks having student roll, and marks M!,M2,M3 as members. Create a console based menu system where there will be two options:-

a)     Display all student records with sum of M1, M2, M3

b)    Display a single student record with sum of M1, M2, M3 after inputting a specific student roll number and validating it.

4.     Create a ‘circle’class and a ‘point’class. The coordinates of the centre of the circle are inputted using keyboard and used within the ‘circle’ class as objects of the ‘point’ class.  Display the area of the circle. Use java as the design language.

5.     Write a program using try and catch to generate Negative Array Index Exception, Arithmetic exception of each division by zero.

6.     Write a program using try catch to generate Negative array Index Exception, Arithmetic exception to catch division by zero.

7.     Write a program for Fibonacci series using constructor.

8.     Create a class Rectangle. The default length breadth are 1 units. When the values of length & breadth are specified, check whether they are in range of 0.0 to 5.0. Provide methods to calculate area and perimeter, return length & breadth. Determine whether the rectangle is squire.

9.     Write a program that will read two matrics & display their product. Before performing operation, check the order of matrics.

10. Write a program to illustrate the concept of a vector.

11. Create a vector with a flowing elements: 4,”C”,5.25,6.15,’A’,’T’ then do the following operations on the vector. Insert ‘T’ at second position & change 6.25 to 10.

12. Explain multilevel hierarchy by a java code using super. Write a simple code to implement wrapper class.

13. Use method overriding to explain polymorphism. Implement an abstract class.

14. Create an overloaded Complex class to implement Complex addition, subtraction, multiplication, division, finding argument of the complex number, initialization using constructor, complex assignments etc.

15. Use java to develop an online customer billing system.

16. Define thread. Write a program in java in which total 4 threads should run. Set different priorities to the threads.

17. Create four threads with priority 1,3,5,7 respectively. Update a counter in each of the threads for 10 mil secs. Print the final value of count for each thread.

18. Create four threads with priority 1,3,5,7 respectively. Update a counter each of the threads for 10mese. Print the final value of the count form each thread.

19. Create one package and write a java file with at least 3 methods. These methods should handle three basic arithmetic operations.  Save the file in the package. Write one more program that imports the above said to use those 4 method.

20. Design a java applet that will blink ‘HAPPY BIRTHDAY’ message in the client area and play a musical sound in the background with a background picture in the client area.

21. Design an applet that will display a text as scrolling marquee. The text can be changed by setting different ‘PARAMS’ value.

22. Design a java applet that programs the mouse so that we may draw various shapes like circle, rectangle etc using click and drag operations.

23. Develop an applet graphical interface for the assignment no. 4.

24. Design a checkbox, ListBox, textbox, Label, Grid   using Japplet importing the swing for Java Foundation class.

25. Design a calculator with applet that behaves like a Calculator

26. Design an analog clock using applet & thread.

27.  Design a form using swing to input data from keyboard and save it to a file . Display records into a form.