public int checkLockCover(int radius, int height, int volumeLow, int volumeHigh) {

        if (radius < 1) {
            System.out.println("You entered a number less than 1. Please enter a number between 1 and 8");
            return -1;
        }
        if (radius > 8) {
            System.out.println("You entered a number greater than 8. Please enter a number between 1 and 8");
            return -1;
        }

        if (height < 1) {
            System.out.println("You entered a number less than 1. Please enter a number between 1 and 8");
            return -1;
        }
        if (height > 8) {
            System.out.println("You entered a number greater than 8. Please enter a number between 1 and 8");
            return -1;
        }

        float power = (float) Math.pow(radius, 2);
        float divisor = (float) height / 3;
        int volume = (int) (Math.PI * power * divisor);
        if (volume >= volumeLow && volume <= volumeHigh) {
            return volume;

        } else if (volume < volumeLow) {
            System.out.println("Volume too low. Sand dumped out.");
            return -1;
        } else {
            System.out.println(" Volume too high. Sand dumped out");
            return -1;

        }
    }