Battle Ship Program (IN JAVA)
BattleShip class
The Battleship class represents a single battleship. Each battleship has a name, attack level, and health level. Your class should
include the following
Constructor that sets health to 100 and initializes the other instance variables appropriately
updateDamage() that takes the attack power of the attacking ship as a parameter and updates the health of the victim based on the following:
If the attack power is less that 5, the ship inflicts 2 damage
If the attack power is less than 10, the ship inflicts 7 damage
If the attack power is 10 or more, the ship inflicts 10 damage
stillFloating() returns if the ship is still floating or not. The ship is floating as long as the health is greater than 0
toString() that returns the name and health of a ship
Tester Class
Make 2 ships using your own literals
Have the ships attack each other a few times
Print out both ships status in the end