import java.io.*; import java.lang.*; //Testing tank public class testNormal1 { public static void main(String[] argn) { try { Tank t1 = new Tank(); Tank t2 = new Tank(); System.out.println("t1 content = "+t1.content()); System.out.println("t2 content = "+t2.content()); t1.add(10.0); t2.add(1000.0); System.out.println("t1 content after adding 10 = "+t1.content()); System.out.println("t2 content after adding 1000 = "+t2.content()); t1.remove(5.0); t2.remove(50.0); System.out.println("t1 content after removing 5 = "+t1.content()); System.out.println("t2 content after removing 50 = "+t2.content()); } catch (IllegalArgumentException e) { System.err.println("Can't add/remove negative amounts"); } catch (Tank.TankOverFlowException e) { System.err.println("Tank overflow by "+e.overflow); } catch (Tank.TankUnderFlowException e) { System.err.println("Tank underflow by "+e.underflow); } } }