import java.io.*; //Testing tank public class testOverflow { public static void main(String[] argn) { try { Tank t = new Tank(); System.out.println("tank content = "+t.content()); t.add(5001.0); System.out.println("Overflow Exception not handled"); } catch (IllegalArgumentException e) { System.err.println("Can't add/remove negative amounts"); } catch (Tank.TankOverFlowException e) { System.err.println("Tank overflow by "+e.overflow+" its original content was "+e.overflowTank.content()); } } }