COLLEGE OF NATURAL & APPLIED SCIENCES, ALLIED HEALTH
AND NURSING
DEPARTMENT OF COMPUTER & INFORMATION SCIENCES
UNDERGRADUATE DEGREE COURSEWORK
SPRING 2022
COURSE NAME: Principles of Programming II
CODE: CPTR242
DUE DATE: APRIL 20, 2022
WEIGHTING: 100 Marks
COURSEWORK TYPE: ASSIGNMENT #4 – INDIVIDUAL (Exception Handling and
Graphical User Interface)
INSTRUCTIONS: ANSWER ALL PARTS OF THIS ASSESSMENT.
The question will test your knowledge and application of exception handling and Graphical
User Interface (GUI) within the Java programming environment. You are expected to
answer all questions by creating a separate program, you will then zip/compress and upload
your files.
Question 1
Create sample Java Program to demonstrate the following:
a) ArrayIndexOutOfBoundsException (4 marks)
b) NumberFormatException (5 marks)
c) StringIndexOutOfBoundsException (5 marks)
d) Create a program that will demonstrate a user defined exception
using the throw keyword. (6 marks)
Question 2
Create the following Order Form (15 marks)
Total: 35 Marks