Course Solutions Uncategorized (Solved) : Looking Method Returns True Given Location Contains Real Ship Still Afloat Says Real Ship Q34187407 . . . .

(Solved) : Looking Method Returns True Given Location Contains Real Ship Still Afloat Says Real Ship Q34187407 . . . .

 

Looking at this method, it returns true if a given locationcontains a real ship that is still afloat. It says “real” shipbecause the ’emptySea’ class extends Ship class with an inheritedlength of one, saving the need for null checks as empty locationsnow contain a non-null value meaning it does not contain a ship.’isOccupied’ will return true if that location contains a ship. The’ships’ array is used to determine which ship is in that location.’allShips’ is an ArrayList to which all ships were added too.

Given this information, I would like to understand how thismethod works – line by line. If someone

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post