Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[9 MARKS] Question 7 Pollen count readings measure the number of pollen grains in the air and are usually in the range of 10 to

image text in transcribed

[9 MARKS] Question 7 Pollen count readings measure the number of pollen grains in the air and are usually in the range of 10 to 200 grains per cubic meter of air. If the pollen count is higher than 200, people that are prone to hay fever must be warned to take precaution. Exception handling allows a programmer to design and code the normal case for a program separately from the code that handles exceptional situations. Define an exception class The class should have two constructors, including one default If the exception is thrown with the default constructor, the method PollenException. constructor. getMessage should return Pollen count outside acceptable range. Take care! [TURN OVER) CSJA1DP OCTOBER/NOVEMBER 2019 The other constructor has a sngle parameter pollenCnt of type int that represents the pollen count. If the exception is thrown with a pollen count of e.g. 50, the method getMessage should return Pollen count of 50 in within the acceptable range

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

Students also viewed these Databases questions