Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.lang.IllegalArgumentException;
- public abstract class ErrorPascal implements Pascal {
- public abstract void printPascal(int n);
- public abstract int binom(int n, int k);
- public static void termsPascal(int n)
- {
- if(n <= 0 ){
- throw new IllegalArgumentException("Invalid values");
- }
- }
- public static void termsBinom(int n, int k)
- {
- if(n < k || k < 0 || n < 0)
- {
- throw new IllegalArgumentException("Invalid values");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement