Question: INSTRUCTIONS: (Generic ArrayBag class) In this assignment your are to implement ArrayBag as a generic class with a parameter T for the elements in the
INSTRUCTIONS: (Generic ArrayBag class)
In this assignment your are to implement ArrayBag as a generic class with a parameter T for the elements in the bag
1) keep two private data fields, each with the properly seleced type
2) Add a getter and setter method for the array, as well as getter and setter method for the array elements of index k
here is my code so far....
public class ArrayBag
public getArrElements(){ //Very stuck with get and set methods for array elements of index k
}
public setArray(){
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
