ADP262S-Prac 8-Exception-2024 PDF, Cape Peninsula University of Technology, 17 Apr 2024

Document Details

BeneficentColumbus

Uploaded by BeneficentColumbus

Cape Peninsula University of Technology

2024

Tags

Java programming GUI applications array manipulation exception handling

Summary

This is a Java programming assignment for Applications Development Practice II at Cape Peninsula University of Technology, featuring array handling and GUI creation. The assignment requires creating a GUI calculator with exception handling. The document details the required steps and structure for the program, including creating an array of strings and handling out of bounds errors.

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