Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Zehra Baig
- //CSC-162-01
- //Lab 6-C
- public class NegativeUnitsException extends Exception
- {
- //Default Constructor
- public NegativeUnitsException()
- {
- super("Units cannot be negative");
- }
- //Overloaded Constructor
- public NegativeUnitsException(int i) // argument constructor
- {
- super("Negative units amount " + i + " is invalid");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement