Question
Using java in netbeans: Create a class called ManyStructures. It encapsulates an instance variable that is a long array. The length of the array should
Using java in netbeans:
Create a class called ManyStructures. It encapsulates an instance variable that is a long array. The length of the array should be dependent on an argument passed into a constructor. Include get and set methods so you can assign values to the elements of the array. The ManyStructures class should also have the following methods. getArray() -- which returns a copy of the instance variable array. Note that I said "copy"! getQueue() -- which returns the data in the instance variable as a queue. getStack() -- which returns the data in the instance variable array as a stack. getLinkedList() -- which returns the data in the instance variable array as a linked list. Your project should contain any other classes you need to complete. Include a ManyStructuresDriver class that tests the ManyStructures class, its methods, and the data structures returned by the methods listed above..
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started