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

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 test it in the ArrayBagDemo.java? should i put it in a different new file? also why are there 4 errors i need help
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

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

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!