Question: question 4 in java please Since you are creating MyLinkedBag class, you will not be using an array to store objects. Instead, you will be
question 4 in java please



![to facilitate storing and retrieving stored objects [ 20 points] This Node](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f321be7187f_91866f321be146f9.jpg)
Since you are creating MyLinkedBag class, you will not be using an array to store objects. Instead, you will be creating a Node class, as inner class within your MyLinkedBag class, to facilitate storing and retrieving stored objects [ 20 points] This Node inner class should: (a) Have an instance variable called 'data', that will store objects of type GymEquipment p4 Feb 18, 2023 (b) Have an instance variable called 'next', that will store a Node object, which represents the node next to current node (c) Have a no-arg constructor (d) Have a 1-arg constructor, that takes an object as an argument (e) Have a 2-arg constructor, that takes an object and Node object as two arguments. This constructor should set the object to the data attribute and Node object to the next node attribute of the current node, as discussed in class (f) Have getters and setters for each of the 2 instance variables for the class /** Have a private instance variable called 'numNodes', whose initial value should be . This variable ... */
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
