PLEASE DO NOT COPY OTHER SOLUTIONS FROM HERE!! THEY ARE WRONG AND NOT COMPLETE!!!! I HAVE POSTED 6 TIMES ALREADY!!!!!!!!
Posted: Tue Jul 12, 2022 8:12 am
PLEASE DO NOT COPY OTHER SOLUTIONS FROM HERE!! THEY AREWRONG AND NOT COMPLETE!!!! I HAVE POSTED 6 TIMESALREADY!!!!!!!!!!!!!!!!
HERE IS THE STARTER CODE:
Note: Before you begin, download the files for Project 6 from the course GitHub repository. You should not modify the package structure of the project. The driver will not run until you complete the methods in LinkedStack and LinkedQueue. You will not receive any credit for implementations that do not use the LinkedStack & LinkedQueue classes defined in the jsjsf package. Submit a .zip of your project code separately from this document. Part 1: Implementing a Stack and a Queue 1) Complete the implementation of the LinkedStack and LinkedQueue classes in the jsjf package. 2) Test your code using the provided sample test driver. Your code should work with the test driver with no modification. 3) You may want to create an additional driver class to test that your implementation is complete and correct, but the output you enter below should be from Project6Sample Driver.java with no modification. Part 2: Using Stacks & Queues Write a class called StackQueueUtil which implements the following methods. You should use a stack and/or queue to solve each problem. a) isPalindrome (s) takes a strings as a parameter and returns true if s is a palindrome and false if it is not. You should ignore any non-letter characters and consider upper- and lowercase letters to be the same. You must use a stack & a queue in your solution. b) reversewords (s) takes a sentence (string) s as a parameter and returns a string with each word in reverse order. Note that each word should remain its original palace in the sentence - only the order of the characters in each word should be changed. You can assume that the words are separated by a single space and punctuation can be considered part of the word. You must use a stack as part of your solution. Examples: Before: After: To be or not to be, that is the question. The best way to predict the future is to invent it of eb ro ton ot ,eb taht si eht .noitseuq ehI tseb yaw ot tciderp eht erutuf si ot tnevni ti c) checkArrays (min, max, arr¹, arr2) has four parameters: two integers representing min and max values and two arrays. The method will check that all numbers falling between the min & max values (inclusive) exist in both arrays and that they occur in the exact same relative order in both arrays. You must use a queue as part of your solution. For example, suppose min-4 and max=6. Then the first set of arrays would return true from checkArray while the second set would not, because the 4, 5, & 6 are in the reversed order. Return true: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10) (4, 3, 2, 1, 5, 10, 9, 8, 6, 7} Return false: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} (10, 9, 8, 7, 6, 5, 4, 3, 2, 1) Implement both parts of the project in a single Java project. You should make use of good Object-Oriented design principles to reduce the amount of code you need to write.
Briefly describe any issues (if any) you ran into with this project: Copy your output of the provided test driver class (with output from all parts) as text below: Copy your peek () method from your LinkedStack class as text below: Copy your isEmpty() method from your LinkedStack class as text below: Copy your size () method from your LinkedQueue class as text below: Copy your toString() method from your LinkedQueue class as text below: Copy your isPalindrome method from your StackQueueUtil class as text below: Copy your reversewords method from your StackQueue Util class as text below: Copy your checkArrays method from your StackQueueUtil class as text below:
HERE IS THE STARTER CODE:
Note: Before you begin, download the files for Project 6 from the course GitHub repository. You should not modify the package structure of the project. The driver will not run until you complete the methods in LinkedStack and LinkedQueue. You will not receive any credit for implementations that do not use the LinkedStack & LinkedQueue classes defined in the jsjsf package. Submit a .zip of your project code separately from this document. Part 1: Implementing a Stack and a Queue 1) Complete the implementation of the LinkedStack and LinkedQueue classes in the jsjf package. 2) Test your code using the provided sample test driver. Your code should work with the test driver with no modification. 3) You may want to create an additional driver class to test that your implementation is complete and correct, but the output you enter below should be from Project6Sample Driver.java with no modification. Part 2: Using Stacks & Queues Write a class called StackQueueUtil which implements the following methods. You should use a stack and/or queue to solve each problem. a) isPalindrome (s) takes a strings as a parameter and returns true if s is a palindrome and false if it is not. You should ignore any non-letter characters and consider upper- and lowercase letters to be the same. You must use a stack & a queue in your solution. b) reversewords (s) takes a sentence (string) s as a parameter and returns a string with each word in reverse order. Note that each word should remain its original palace in the sentence - only the order of the characters in each word should be changed. You can assume that the words are separated by a single space and punctuation can be considered part of the word. You must use a stack as part of your solution. Examples: Before: After: To be or not to be, that is the question. The best way to predict the future is to invent it of eb ro ton ot ,eb taht si eht .noitseuq ehI tseb yaw ot tciderp eht erutuf si ot tnevni ti c) checkArrays (min, max, arr¹, arr2) has four parameters: two integers representing min and max values and two arrays. The method will check that all numbers falling between the min & max values (inclusive) exist in both arrays and that they occur in the exact same relative order in both arrays. You must use a queue as part of your solution. For example, suppose min-4 and max=6. Then the first set of arrays would return true from checkArray while the second set would not, because the 4, 5, & 6 are in the reversed order. Return true: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10) (4, 3, 2, 1, 5, 10, 9, 8, 6, 7} Return false: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} (10, 9, 8, 7, 6, 5, 4, 3, 2, 1) Implement both parts of the project in a single Java project. You should make use of good Object-Oriented design principles to reduce the amount of code you need to write.
Briefly describe any issues (if any) you ran into with this project: Copy your output of the provided test driver class (with output from all parts) as text below: Copy your peek () method from your LinkedStack class as text below: Copy your isEmpty() method from your LinkedStack class as text below: Copy your size () method from your LinkedQueue class as text below: Copy your toString() method from your LinkedQueue class as text below: Copy your isPalindrome method from your StackQueueUtil class as text below: Copy your reversewords method from your StackQueue Util class as text below: Copy your checkArrays method from your StackQueueUtil class as text below: