The TODO Application
Write a class ``Todo'' that manages a queue of up to 100 TODO items!
The following instruction will explain step by step how to write such a class.
The idea is to have a queue that should work as a First-In-First-Out (FIFO) stack. This means TODO items should be processed in the order they were entered.
Attributes you need:
(remember: attributes should be private)
``item'' - a String array
``count'' - an int
The idea is to store the TODO items as strings in the array item[] starting from index
0 (the first item that was entered and the first that will be worked on)
up to and including index count-1 (the last item).
This is just one (straightforward) way to implement a FIFO.
Methods you need:
(remember: methods should be public)
``Todo'' - the constructor. It should take no arguments, initialize
item to be an array of 100 Strings and initialize
count to be 0.``push'' - should take a String as an argument,
assign it to item[count] and
increment count by 1.push adds a new TODO item at the end of the queue.
``pop'' - should take no argument, assign
item[0] to a temporary String variable tmp, shift all array
elements down by one position (overwriting item[0]), decrement
count by 1 and return tmp.``getCount'' - should take no argument
and return count.