-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNoSameInstrumentException.java
More file actions
27 lines (25 loc) · 956 Bytes
/
Copy pathNoSameInstrumentException.java
File metadata and controls
27 lines (25 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* An exception class named NoSameInstrumentException
* which is thrown when an instrument of same serial number is bought
* @author Alizain Charania
* @version 1.0 Oct. 6 2015
*/
public class NoSameInstrumentException extends Exception {
/**
* This is a no args constructor for the NoSameInstrumentException class
*/
public NoSameInstrumentException() {
super("NotEnoughFundsException You cannot buy instruments"
+ " you already own. Two instruments can"
+ " never have same Serial Number. Check again!");
}
/**
* This is a constructor for the NoSameInstrumentException class
* @param msg any message that is passed in when it is thrown
*/
public NoSameInstrumentException(String msg) {
super(msg + "\nYou cannot buy instruments"
+ " you already own. Two instruments can"
+ " never have same Serial Number. Check again!");
}
}