Description
CSCI 251 Project Two: Implement and Apply Stack and Queue focuses on implementing fundamental data structures in Java using ArrayList. The assignment requires students to develop MyStack and MyQueue classes demonstrating Last In First Out (LIFO) and First In First Out (FIFO) behavior, and apply these structures to palindrome checking through an isPalindrome method.
Assignment Description
Purpose
The purpose for this project is to reinforce the knowledge from Chapter Two of the textbook. The students will practice how to implement stack and queue data structure using list structure, for instance, ArrayList. The students will also apply stack and queue in real project, for instance, to check if a string is
a palindrom.
Tasks:
- Use ArrayList to implement MyStack class which define the data
structure that has Last In First Out property (35%)
- Use ArrayList to implement MyQueue class which define the data
structure that has First In First Out property (35%)
- Write a function public static Boolean isPalindrome(String sentence)
(30%). This function returns true if sentence is a palindrome; false
otherwise.
Sample files:
Three sample files are given. The students should add necessary comments to all files and implement all functionalities in the given files. No extra functions can be added. No function name can be changed. The students should run the executable jar file to see how project should run. The students should zip whole project and submit it via blackboard link.
Due Date:
Will be announced on blackboard
Solution Overview
The solution covers Java implementations of MyStack and MyQueue using ArrayList to support LIFO and FIFO operations. It also addresses the isPalindrome(String sentence) method for palindrome validation while preserving the provided function names and avoiding additional methods.

