Question: In the add ( T newElement ) method in the ArrayBag class, why do we add a new item at the end of the array?

In the add(T newElement) method in the ArrayBag class, why do we add a new item at the end of the array?
Select an answer and submit. For keyboard navigation, use the up/down arrow keys to select an answer.
a
This is required by the specification in the BagInterface
b
It is convenient and efficient to add it there and the interface does not care
c
In fact the new item is not added a the end of the array -- it is added in the index to maintain proper ordering of the data

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!