Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1: Implement a class called BonusTooHighException, designed to be thrown when a bonus value is more than $10000. Using the Executive class from Chapter 10,

1: Implement a class called BonusTooHighException, designed to be thrown when a bonus value is more than $10000. Using the Executive class from Chapter 10, create a main program that creates and populates an Executive array with information entered by the user (array size as well). If a bonus value is entered that is too high, i.e. more than $10000 throw the exception. Allow the thrown exception to terminate the program.

2: Modify the solution to the program above (submit a second file for this) such that it catches and handles the exception if it is thrown. Handle the exception by printing an appropriate message and keeping the bonus=0, and then continue entering more executive data. Let the program conclude by printing the total number of executives with valid bonuses, i.e. positive, no more than $10000 as well as the average pay.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Employeejava public class Employee private final String name private final String address private fi... 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

Systems analysis and design

Authors: Alan Dennis, Barbara Haley Wixom, Roberta m. Roth

5th edition

978-1118057629, 1118057627, 978-111880817

More Books

Students also viewed these Programming questions

Question

How do theories differ from methods? AppendixLO1

Answered: 1 week ago

Question

Describe Hobbess beliefs about human nature.

Answered: 1 week ago

Question

Compare and contrast two major ways to provide system support.

Answered: 1 week ago