Refactored Ship.java