MISSION+LALA

BACKGROUND LA Stack In computer science, a stack is a last in, first out(LIFO) abstract data type and data structure. A stack can have any abstract data type as an element, but is characterized by only two fundamental operations, the push and the pop. The push operation adds to the top of the list, hiding any items already on the stack, or initializing the stack if it is empty. The pop operation removes an item from the top of the list, and returns this value to the caller. A pop either reveals previously concealed items, or results in an empty list.

A stack is a restricted data structure, because only a small number of operations are performed on it. The nature of the pop and push operations also means that stack elements have a natural order. Elements are removed from the stack in the reverse order to the order of their addition: therefore, the lower elements are typically those that have been in the list the longest.

Check out this [|BLOG]. She is "patient,lovable...friendly...cute...happy go lucky..DANGEROUS!!!... " with typo and on Data structures ..... media type="youtube" key="gYxmm79zxTQ" height="285" width="340"

LA MISSION (THE ARRAY VERSION) code Design and implement a STACK class which is capable of storing a maximum of 5 characters. The STACK class has a LIFO data structure.

Private Attributes: Top            //Index to the  next item to POP/PUSH Array of 5 CHAR //Storage for the 5 characters FULL           //Indicates that the STACK already has 5 characters EMPTY          //Indicates that there are no items in the STACK

Public Methods: Constructor, destructors, Bool PUSH( char ) //Adds an item to the TOP of the STACK Char POP      //Removes an item to the TOP of the STACK Bool ISEMPTY  //Checks if STACK is Empty Bool ISFULL //Checks if STACK is Full Note: Follow the above specifications closely. You are not allowed to add additional methods.

Test your STACK class in the main program to demo that it works for 1)   Removing an item from a STACK  with no items 2)    Adding items to a STACK that has 4 items 3)   Adding an item to a STACK that has 5 items 4)    Show that the items in the STACK are in LIFO order. code Submission Details Pages will be created after National Day to facilitate uploading of code here. Last day of submission: 17 August 09 LA Mission applies to all DS students.