2. (10 points) Solvethe following problem (Ch. 11).
(a) Create anexception class called IceCreamConeException, whose constructoraccepts a String for a message to be passed to the parent of theclass so it can be used in a getMessage() call for display. Thereceived message by the IceCreamConeException class constructorshould indicate the reason for the thrown exception (e.g,Non-acceptable flavor, or number of scoops) and the value causingthe exception.
(b) Create a class called IceCreamCone which has two instancevariables, Flavor as a String and Scoops as an integer, and aconstant String array of flavor choices, called FLAVORS. Allow atleast four flavors of your choice.
PayPal Gateway not configured
PayPal Gateway not configured