You are at a restaurant eating lunch with a friend. After the meal, your friend realizes they left their wallet at home. Your friend gives you a piece of silver….
Convert your algorithm to java program showing the color name as the stack element
Problem-1 : In each plastic container of Pez candy, the colored candies are stored in random order. Your little brother BANTY likes only the yellow ones, so he painstakingly takes out all the candies one by one, eats the yellow ones, and keeps the others in order, so that he can return them to the container in exactly the same order as before minus the yellow candies, of course. Write the algorithm to simulate this process. (You may use any of the stack operations defined in the Stack ADT). Convert your algorithm to java program showing the color name as the stack element