Question
Please help me code the following in: JAVA! Please read the task THOROUGHLY, and please use many comments so I can understand. Full points will
Please help me code the following in: JAVA!
Please read the task THOROUGHLY, and please use many comments so I can understand.
Full points will be awarded, thanks in advance!
Description: Build three classes that conform to the following interfaces. Use arrays in creating your classes (e.g., do not use the built-in ArrayList class when creating the ArrayList-like interface). Extend the sample driver below to completely test the FIFO nature of a Queue, the LIFO nature of a stack and the arbitrary inserts and removes in an ArrayList-like structure.
Sample Driver: ArrayBasedDataStructuresDriver.java show below:
Incomplete Driver for ArrayList (ObjectList), Stack and Queue public class ArrayBasedDatastructuresDriver i public static void main(String[] args) stackTests () queueTests); arrayListTests() private static void arrayListTests ) //todo: make more tests here ArrayList a new ArrayList ) a.insert ('B', 0); a.insert ('a',0) a.insert ('t',1); System.out.println (a.toString ()); while (a.isEmpty) false) System.out.println (a.remove (0)) private static void queueTests) //todo: make more tests here Queue a = new Queue(); a.enqueue ('B)i a.enqueue ('a)i a.enqueue ("t')i System.out.println (a.toStringO) Incomplete Driver for ArrayList (ObjectList), Stack and Queue public class ArrayBasedDatastructuresDriver i public static void main(String[] args) stackTests () queueTests); arrayListTests() private static void arrayListTests ) //todo: make more tests here ArrayList a new ArrayList ) a.insert ('B', 0); a.insert ('a',0) a.insert ('t',1); System.out.println (a.toString ()); while (a.isEmpty) false) System.out.println (a.remove (0)) private static void queueTests) //todo: make more tests here Queue a = new Queue(); a.enqueue ('B)i a.enqueue ('a)i a.enqueue ("t')i System.out.println (a.toStringO)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