@@ -0,0 +1,1327 @@
+package lab7;%0A%0Aimport java.util.Scanner;%0A%0Apublic class IO%0A%7B%0A%09/**%0A%09%09Read a string from the keyboard%0A%09%09@return String from keyboard%0A%09*/%0A%09public static String readString()%0A%09%7B%0A%09%09Scanner in = new Scanner(System.in);%09// Opposite to System.out%0A%09%09String i = in.next();%0A%09%09return i;%0A%09%7D%0A%09/** %0A%09%09Read an integer from keyboard. Verify/retry for integer%0A%09%09@return Integer from keyboard %0A%09*/%0A%09public static int readInt()%0A%09%7B%0A%09%09int i = 0;%09%09//Initialize for return%0A%09%09boolean failure = false;%0A%09%09Scanner in = new Scanner(System.in);%0A%09%09do%0A%09%09%7B%0A%09%09%09failure = false;%09//Reinitialize for if%0A%09%09%09if (in.hasNextInt())%0A%09%09%09%09i = in.nextInt(); //Good one%0A%09%09%09else%0A%09%09%09%7B%0A%09%09%09%09failure = true;%0A%09%09%09%09String temp = in.next();%09//Clear the buffer%0A%09%09%09%09System.out.print(%22Please enter an integer: %22);%0A%09%09%09%7D%0A%09%09%7Dwhile(failure); %09%0A%09%09return i;%0A%09%7D%0A%09/** %0A%09%09Read an double from keyboard. Verify/retry for double%0A%09%09@return Double from keyboard %0A%09*/%0A%09public static double readDouble()%0A%09%7B%0A%09%09double i = -1.0;%09%09//Initialize for return%0A%09%09boolean failure = false;%0A%09%09Scanner in = new Scanner(System.in);%0A%09%09do%0A%09%09%7B%0A%09%09%09failure = false;%09//Reinitialize for if%0A%09%09%09if (in.hasNextDouble())%0A%09%09%09%09i = in.nextDouble();%09%09// Good one%0A%09%09%09else%0A%09%09%09%7B%0A%09%09%09%09failure = true;%0A%09%09%09%09String temp = in.next();%09//Clear the buffer%0A%09%09%09%09System.out.print(%22Please enter a double: %22);%0A%09%09%09%7D%0A%09%09%7Dwhile(failure);%0A%09%09return i;%0A%09%7D%0A%7D%0A

Create IO.java