Question: Write an instance method for the Aquarium class called deleteLastFish with the prototype you see below. The method will delete the last fish in the

 Write an instance method for the Aquarium class called deleteLastFish with

Write an instance method for the Aquarium class called deleteLastFish with the prototype you see below. The method will delete the last fish in the aquarium (the last entry in the array). The resulting array must be resized so that there are no null entries. If the aquarium is empty when this method is called then it should throw an IllegalStateException

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!