Question: Question 7: Set up a new project in your IDE with a Main class. Your project name should be MyDataStructure and it should be saved

 Question 7: Set up a new project in your IDE with

Question 7: Set up a new project in your IDE with a Main class. Your project name should be MyDataStructure and it should be saved under practical-06 Question 8: Define a MyStack class. You need to implement a stack by creating push method for entering elements and pop method for retrieving elements from an array. The data type stored in your stack should be String public class MyStack Attributes: private int maxSize; // the maximum size of your stack private String[] stackArray; II an array to save all elements in your stack private int top; // the index of top element in your stack Methods: public void push(String s); public String pop() public boolean isEmpty() public boolean isFull(); Question 9: In your Main class, build a removeRepeatedLetters method private static String removeRepeatedLetters (String input); The removeRepeatedLetters method take a String of lower case letter as input. Your removeRepeatedLetters method should remove all paired letters from it and return the nswer. For example, Input abcdbcah Output: dh Input: abbbc Output: abc Input: aaa Output:a Input: abczcazb Output: Hint: you can add some public methods in MyStack class to help you solve this quetsions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!