🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

ADP262S-Prac 8-Exception-2024.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Document Details

BeneficentColumbus

Uploaded by BeneficentColumbus

Cape Peninsula University of Technology

2024

Tags

java programming exceptions gui development

Full Transcript

Cape Peninsula University of Technology Department of Information Technology Applications Development Practice II 17 Apr 2024 Java: Exceptions 1. Write a program that meets the following requirements: Create an array with 10 Str...

Cape Peninsula University of Technology Department of Information Technology Applications Development Practice II 17 Apr 2024 Java: Exceptions 1. Write a program that meets the following requirements: Create an array with 10 String elements. Create a Gui with a text field to enter an array index value and another text field to display the array element value. Create Show Element button to cause the array element to be displayed. If the specified index is out of bounds, use try…catch blocks to display an appropriate message using a JOptionpane method. 2. Write a Java program to produce the following GUI calculator. Use exception-handling to catch any exceptions (divide by zero, or non-integer input). Display any errors in a JOptionPane message dialogue box.

Use Quizgecko on...
Browser
Browser