Question: i dont understand i put code in the ArrayBag.java. but am i supposed to put it in the BagInterface.java? what do i do before i

Problem Description: Implement a method replace for the ADT bag that replaces and returns an unspecified object currently in a bag with a given object. C Replaces an unspecyind entr in bit bag with a given abject. (iporam nylacement The ghwer obyect public TreplacerT replacememitis Test the method "replace" in the ArrayBagDemo.java, Required Submission Files: ArrayBag.java, ArrayBagDemo.java, Baginterface.java return where; f// end gettrindexof 3/1 and ArrayBag public T replace(T anEntry) f f/create an Object of T type and initialize it with /ul. Trglt = null; /lcheck is empty or not if (numberopBntries>0) \{ floall remove method to remove lant element ralt = this. remove( ) f/add new element in bag this. add (anEntry); ) //return the remoyed element or null raturn relt ) Q 96 ArrayBagaiava Compile Messages
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
