@Override
	public int getGrade(Node<T> n) {
		if (!(n instanceof BinaryNodePS)) {
			throw new DifferentNodeTypesException();
		} else if (isSafe() && !contains(n)) {
			throw new NodeNotFoundException();
		}
		int grade = 0;
		BinaryNodePS<T> bn = (BinaryNodePS<T>) n;
		if (bn.getLeft() != null) {
			grade++;
		}
		if (bn.getRight() != null) {
			grade++;
		}
		return grade;
	}