Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello can I get some helpw ith the assignment below please? ----------------------------------------------------------------------------------------------------------------------------------------------- // Test1.java // Catching subclass exceptions public class Test1 { // The header

Hello can I get some helpw ith the assignment below please?

image text in transcribed

image text in transcribed

-----------------------------------------------------------------------------------------------------------------------------------------------

// Test1.java // Catching subclass exceptions

public class Test1 {

// The header of your executing main method goes here.

{

// Place your two try-catch blocks here. }

} // end class Test1

// Place your exception subclasses (with empty bodies) here.

---------------------------------------------------------------------------------------------------------------------------------

// place an import statement here to catch input/output exceptions.

public class Test2 {

// The header of your executing main method goes here.

{

// Place your four try-catch blocks here.

}

} // end class Test1

// Place your two subclasses (with empty bodies) here.

Module 4.3 | Challenge Exception Hierarchies Overview In the first part of this challenge, you will write a program that demonstrates that an exception superclass will catch exceptions of exceptions thrown by its exception subclasses. In the second part of this challenge, you will write another program that demonstrates how exceptions are caught with catch (Exception exception). Each of these skeleton application programs run independently of each other Specifications Part A . Use inheritance to create an exception superclass (called ExceptionA) ExceptionA and exception subclasses ExceptionB and ExceptionC. Refer to the diagram (right) . Each of these classes may be written with an empty class body. ExceptionB Write an application named Testl with these classes included Demonstrate that the catch block for type ExceptionA catches exceptions of ExceptionB and ExceptionC. Sample output is shown below ExceptionC Part B Reuse your code from Part A for these classes o ExceptionA (which inherits from Exception) o ExceptionB (which inherits from ExceptionA) Write an application named Test2 with these classes included Create try blocks that throw exceptions of types: o ExceptionA o ExceptionB o NullPointerException o IOExceptiorn . Write a catch block for each try block specifying type Exception. . Sample output is shown below Additional Requirements .Follow the Basic Coding Standards. Include a comment section at the top of your program with your student ID, name, and title of the program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions

Question

What are some similarities in the world's financial systems?

Answered: 1 week ago

Question

Hello can I get some helpw ith the assignment below please?...

Answered: 1 week ago