Programs 👇👇👇

1.Write a java program that works as a simple calculator. Use a GridLayout to arrangeButtons for digits and for the + - * % operations. Add a text field to display the result. Handle any possible exceptions like divide by zero

2.Write an applet program that displays a simple message

Write a java program that Develop an applet that receives an integer in one text field, and computes its factorial Value and returns it in another text field, when the button named “Compute” is clicked

3. Write a program that creates a user interface to perform integer divisions. The userenters two numbers in the text fields, Num1 and Num2. The division of Num1 and Num2 is displayed in the Result field when the Divide button is clicked. If Num1 or Num2 were not an integer, the program would throw Number Format Exception. If Num2 were Zero, the program would throwan Arithmetic Exception Display the exception in a message dialog box.

4. Write a Java program that implements a multithreaded program has three threads. First thread generates a random integer every 1 second and if the value is even, second thread computes the square of the number and prints. If the value is odd the third thread will print the value of cube of the number.

5. Write a java program to create an abstract class named shape that contains twointegers and an empty method named printArea() Provide three classes named Rectangle,, Triangle and Circle such that each one of the classes extends the class shape. Each one of the class contains only the method printArea() that print the area of the given shape.

6. Write a java program that handles all mouse events and shows the event name at thecenter of the window when mouse event is fired(Use Adapter classes).

7. Write a Java program that correctly implements the producer – consumer problem using the concept of interthread communication

8. Write a Java program that implements Bubble sort algorithm for sorting in descending order and also shows the number of interchanges occurred for the given set of integers.