Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume we have a method that check a student GPA and if GPA is below 2.0 it will throw an exception that will be handled

Assume we have a method that check a student GPA and if GPA is below 2.0 it will throw an exception that will be handled by a custom exception handler. Your job is to write a custom exception that handles the case when a student GPA is less than 2.0 which indicates that he cannot graduate from the collage.

Write custom exception handler class

Complete method checkGPA. Exception message should be student cannot graduate

Write the main class. Instantiate two objects to test your code. One to test gpa<2.0 and another one to test gpa >= 2.0

Submit your code and output.

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

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

5. List the forces that shape a groups decisions

Answered: 1 week ago

Question

4. Identify how culture affects appropriate leadership behavior

Answered: 1 week ago