Your task is to utilize a stack collection your program


The objective of this assignment is to allow you to work with the Stack data structure and explore the idea of first-in, last-out (FILO).

Your task is to utilize a stack collection. Your program should allow the user to add a biscuit, remove a biscuit, and print the status of the stack.

The stack should store the time in which the biscuit was added; and when a biscuit is removed, the program should display how long the biscuit "lived" in the pan (i.e. the difference from now to when it was added to the pan).

Important items to consider: Don't allow the user to remove (pop) a biscuit if the pan is empty Displaying the status of the stack should show how many biscuits are in the stack and the "age" of the topmost biscuit Use the Stack class to make your job a LOT easier (otherwise, you must implement the stack class yourself).

To get the time in Java, import java.util.* and then make use of the Date class.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Your task is to utilize a stack collection your program
Reference No:- TGS02877945

Expected delivery within 24 Hours