Create a frame. Place two textboxes in the frame using any appropriate layout. Then place four buttons with the button title SUM, AVERAGE, MAXIMUM and MINIMUM. If the user put two numeric values in the text fields and click any of the button, then a corresponding calculation ( sum, average, maximum or minimum) of the two inputs should be shown in a JOptionPane Message Dialogue popup. If the user mistakenly provides any non numerical values in any of the textboxes then a message "Input should be numerical. Please try again" should be shown in a JOptionPane Message Dialogue popup.
Comments
Leave a comment