The Strange Stack

reimplement the Stack ADT, using a C++ unsigned long data type to contain the stack elements (all of them !). In other words, one long integer variable is used as a stack that can store several integers. One of the main points of this exercise is to impress upon you that abstract data structures need not be implemented in a way that conforms at all to our preconceived notions. Often programmers need to find new and creative (sometimes even bizarre!) ways to implement the data structures they want to use.

You must implement all the stack operations for the Stack ADT exactly as specified. In addition, you must specify and implement a client function called PrintStack, which neatly prints the contents of a stack on the screen, in a column, one stack element per line, in the same order that the elements would come off the stack if they were to be taken off using the Pop operation. If the stack is empty, PrintStack has no output at all. The stack itself must be in the same state after the PrintStack operation is executed as it was before. The same elements are in the stack, in the same order.

In designing the data structure, you should assume that the stack elements are integers in the range 0 to 9. Given the size of the elements and the size of a variable of type unsigned long, you must determine the value of MAX_STACK. Remember, the whole stack must fit inside a single long integer.

*Testing the Stack Operations*

You must create a Menu-based test driver and you must conduct a test according to your predefined test plan. Store the results of the execution in a file called "[url removed, login to view]". Make sure you use the C++ exception mechanism to throw and catch the exceptions !!!

## Deliverables

1. The [Visual C++] project of the Stack ADT.

2. The output file produced by your test, "[url removed, login to view]".

## Platform

Visual C++ 6.0

Habilidades: Programação C, Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software

Veja mais: variable programming, use of data structures, use of data structure in programming, used structures, unsigned integer, type of data structures, type of data structure in c, stack programming, stack of data structure, stack in data structures, stack in data structure, stack data structures, stack data structure, programming variable, programming structures, programming in data structure, programming data structures in c, programming data structure, programming and data structures, programming and data structure, programmers on line, points that are on the same line, operations on data structures, one off programmers, new data structures

Acerca do Empregador:
( 8 comentários ) United States

ID do Projeto: #2985014

Concedido a:


See private message.

$7 USD em 3 dias
(57 Comentários)