Skip to content

ShankarJava/Btech_Experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BTECH-EXPERIMENTS

  1. Write a Java program that works as a simple calculator. Use a grid layout to arrange buttons for the digits and for the +, -, *, % operations. Add a text field to display the result. Handle any possible exceptions like divided by zero.

  2. Write a Java program that creates a user interface to perform integer divisions. The user enters two numbers in the text fields, number 1 and number 2. The division of number 1 and number 2 is displayed in the result field when the divide button is clicked. If number 1 or number 2 were not an integer, the program would throw a NumberFormatException. If number 2 were 0, the program would throw an ArithmeticException. Display the exception in the message dialog box.

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

  4. Write a Java program for the following:

    1. Create a doubly linked list of elements.
      2.Delete a given element from the above list.
      3.Display the contents of the list after deletion.
  5. To write a Java program that simulates a traffic light, the program lets the user select one of three lights, red, yellow, or green, with radio buttons. On selecting a button, an appropriate message with STOP or READY or GO should appear above the buttons in selected color. Initially, there is no message shown.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages