public static ArrayList<Integer> readInputs() {
ArrayList<Integer> inputs = new ArrayList();
System.out.println("Please enter the cost of each product, enter Q to quit:");
Scanner in = new Scanner(System.in);
int value = 0;
while(in.hasNextInt()) {
value = in.nextInt();
if(value < 1) {
System.out.println("Values must be positive, try again");
} else {
inputs.add(value);
}
}
return inputs;
}