Em Andamento

Prolog- Double Queue

This project has two parts, a theoretical ("pencil-and-paper") part and a programming part. As with the first project, the "pencil-and-paper" part of this project is to be written up as a comment inside the file with your program. (Put it somewhere near the beginning of the file.) Here are the details.

_Part I_

Part I consists in completing the theoretical representation of the "doublequeue" data type. We will use the following eleven operations, with the following signatures.

create: ? doublequeue

enqueuefront: doublequeue X element ? doublequeue

enqueuerear: doublequeue X element ? doublequeue

front: doublequeue ? element

rear: doublequeue ? element

dequeuefront: doublequeue ? doublequeue

dequeuerear: doublequeue ? doublequeue

isin: doublequeue X element ? boolean

empty: doublequeue ? boolean

size: doublequeue ? number

full: doublequeue ? boolean

Part II

Code this all up using Prolog! Specifically, here is what your project should do.

Your code should look for input in a text file called proj2input (no extension). The material in this file is to be read in and processed. Processing this material consists in simulating (or perhaps actually maintaining? Is there a difference?) a double-ended queue.

For this project, a data object of type "element" will simply be a string of lower-case alphabetic characters. A data object of type "number" will be a nonnegative integer.

Your task in Part I is to write up axioms for this definition of "doublequeue". Two hints:

Part II

Code this all up using Prolog!

Your code should look for input in a text file called proj2input (no extension).

The input will consist of a series of input units each of which involves applying one of the operations of part I together with (in some cases) additional information. In the case of "front", "rear", "isin", "empty", "size", and "full", your program will have to print out the required information. In the case of ALL the input units, your program is required to print out the current state of the queue after that input unit has been processed.

Output is to be printed to the screen. Make use of lots of "nl" calls to create a reasonable formatting of the output, for readability.

## Deliverables

<[url removed, login to view]~cse340/[url removed, login to view]>

## Platform

Prolog - windows 2000

GNU Prolog

Habilidades: Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software

Ver mais: use case extension, prolog programming, programming prolog, programming definition, double programming, definition programming, programming boolean, boolean programming, queue, material engineering, eas, completing case, axioms, project using queue, queue php, create pencil, string integer, print html paper, theoretical paper, write php extension, operations paper, write program print empty, write use cases, print details paper php, html unit

Acerca do Empregador:
( 0 comentários ) Turkey

ID do Projeto: #3016866

Premiar a:

amosoftwaregroup

See private message.

$76.5 USD em 5 dias
(34 Avaliações)
4.4