Advertisement
Guest User

.txt

a guest
Jun 24th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. package appli;
  2. import info1.ships.*;
  3.  
  4. public class Application {
  5. public static void main(String[] args) {
  6. try {
  7. String c1 = new String("A1");
  8. String c2 = new String("A3");
  9. IShip bateau = new Cruiser("navire",c1,c2 );
  10. NavyFleet maFlotte = new NavyFleet();
  11. maFlotte.add(bateau);
  12. maFlotte.toString();
  13. } catch (CoordsBadShipException e) {
  14. e.printStackTrace();
  15. } catch (BadCoordException e) {
  16. e.printStackTrace();
  17. }
  18.  
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement