JAVA (a) [3 marks] Write the programmer’s perspective of a method header named “doProcess” that is public, does not retu

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

JAVA (a) [3 marks] Write the programmer’s perspective of a method header named “doProcess” that is public, does not retu

Post by answerhappygod »

JAVA
(a) [3 marks] Write the programmer’s perspective of a method
header named “doProcess” that is public,
does not return any value, has one input argument of type
String and throws a “checked”
IllegalArgumentException.
Only the method header is required.
(b) [4 marks] Now write the user’s perspective code that
calls “doProcess” and handles the checked exception.
Just the skeleton is required not the actual code for the user’s
method.
(c) [1 mark] Does the method header require any changes
if it throws only unchecked exceptions? (YES/NO)
(d) [1 mark] Can a method throw more than one type of
checked exception? (YES/NO)
(e) [1 mark] Can programmers write their own classes of
exceptions in Java? (YES/NO)
(Please write your essay question on a separate piece of
paper)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply