Em Andamento

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

Ver mais: use data structures, use data structure programming, used structures, unsigned integer, type data structures, stack programming, stack data structures, stack data structure, programming variable, programming data structure, programmers line, points line, operations data structures, one programmers, new data structures, exercise programming, element 14, data structure type, data structures using, data structure stack, data structures operations, data structures programming, data structure operations, create test plan, programming find output

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

ID do Projeto: #2985014

Premiar a:

jamix2

See private message.

$7 USD em 3 dias
(57 Avaliações)
5.9