Question: Create TooColdException and TooHotException Exceptions Design a class Customer with following characteristics. Member method: int giveCupOfCoffee ( int temperature ) The method should check whether
Create TooColdException and TooHotException Exceptions
Design a class Customer with
following characteristics.
Member method:
int giveCupOfCoffeeint
temperature
The method should check
whether the coffee is too cold
or too hot.
The method throws
exception TooColdExceptio
n if coffee is cold below
The method throws
exception TooHotException
if coffee is overly hot over
Return if coffee is at a
perfect temperature.
Input
Output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
