Write pseudocode

Assignment Help Programming Languages
Reference no: EM1321012

When you write a program using an abstract data structure, you can complete the design of the program before you determine the actual implementation of the data structure. If you design the interfaces carefully, you should be able to change the way you implement the data structure without affecting the outcome of the program. In this Application, you will write alternative pseudocode implementations of a queue.

A queue is a first-in, first-out list. The queue has two essential operations: enqueue, which appends an entry to the end of the list (called the tail) and dequeue, which returns and removes the first entry in the list (called the head). The queue returns entries in the sequence in which they were added. When you do this in real life, you may refer to it as "standing in line." Some queue implementations include auxiliary operations that may allow programmers to write simpler code.

1.     Write pseudocode that represents the abstract functions of the enqueue and dequeue operations. Define and explain any supplementary information needed by your pseudocode.

2.     Refer to the fixed array implementation in Figure 8.5 of your textbook. Write pseudocode that implements the enqueue and dequeue operations by using a fixed array named Cells. The head of the queue should always be in Cells[1]. Define and explain any supplementary information needed by your pseudocode.

3.     Refer to the circular array implementation in Figure 8.14 of your textbook. Write pseudocode that implements the enqueue and dequeue operations using this technique. Define and explain any supplementary information needed by your pseudocode.

4.     What do you see as the advantages and disadvantages of each implementation?

When you write a program using an abstract data structure, you can complete the design of the program before you determine the actual implementation of the data structure. If you design the interfaces carefully, you should be able to change the way you implement the data structure without affecting the outcome of the program. In this Application, you will write alternative pseudocode implementations of a queue.

A queue is a first-in, first-out list. The queue has two essential operations: enqueue, which appends an entry to the end of the list (called the tail) and dequeue, which returns and removes the first entry in the list (called the head). The queue returns entries in the sequence in which they were added. When you do this in real life, you may refer to it as "standing in line." Some queue implementations include auxiliary operations that may allow programmers to write simpler code.

1.     Write pseudocode that represents the abstract functions of the enqueue and dequeue operations. Define and explain any supplementary information needed by your pseudocode.

2.     Refer to the fixed array implementation in Figure 8.5 of your textbook. Write pseudocode that implements the enqueue and dequeue operations by using a fixed array named Cells. The head of the queue should always be in Cells[1]. Define and explain any supplementary information needed by your pseudocode.

3.     Refer to the circular array implementation in Figure 8.14 of your textbook. Write pseudocode that implements the enqueue and dequeue operations using this technique. Define and explain any supplementary information needed by your pseudocode.

4.     What do you see as the advantages and disadvantages of each implementation?

Reference no: EM1321012

Questions Cloud

How do duties and exchange rates affect decisions : How do duties and exchange rates affect decisions about facility location in a supply chain? Please select two countries where facilities are located when responding to this question.
Money multiplier smaller than inverse of the reserve ratio : Why is the money multiplier in the United States smaller than the inverse of the required reserve ratio? Provide one (1) reason. Explain why depositing cash into a checking account does not change the money supply. Provide at least one (1) supporting..
Ways to use macroeconomic analysis : Describe three (3) ways we can use macroeconomic analysis, with one (1) original example for each way. Using the real business cycle theory, explain two (2) effects of an adverse technological shock on the labor market and on the output market.
Use descriptive statistics : Use descriptive statistics to explain how parental involvement and interests in child's education can impact on educational attainment measured in terms of their numeracy (v24_7), literacy (v28_7) and creativity skills (v25_7 and v26_7)
Write pseudocode : Write pseudocode that represents the abstract functions of the enqueue and dequeue operations. Define and explain any supplementary information needed by your pseudocode.
Investment activities : Analyze and interpret data trends (e.g., unemployment, inflation, real GDP, interest, housing starts) over the most recent three-year period to evaluate the economy and Canada's current economic status.
Preparing financial statements : Preparing Financial Statements,  List and explain investors' motivation for investing in stocks, bonds, preferred shares, and convertibles based on the characteristics of each of these financial vehicles from the risk and income perspective of invest..
Different types of warranties : Discuss the difference between the 3 different types of warranties and then draft three different examples of an advertisement that uses an express warranty, a disclaimer, and puffing language.
Recommendation for improving the communication process : What recommendation could you make to improve the communication process Use references to support your findings.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  What is the throughput of the system

what is the throughput of the system

  Communicate with a pc using the rs232c serial protocol

In this assignment we will use the UART0 peripheral to communicate with a PC using the RS232C serial protocol.

  Technical project: sample website project

Technical Project: Sample Website Project , This assignment consists of three (3) sections: a narrative, a storyboard, and a business Website. You must submit all three (3) sections for the completion of this assignment.

  Hierarchy of processes

Write a program that creates a hierarchy of processes using the fork() system call.

  Travelling salesman problem

Travelling Salesman Problem on the L1-metric plane.

  Hubspot: inbound marketing and web 2.0

Hubspot: Inbound Marketing and Web 2.0

  Create a multi-threaded competition

Create a multi-threaded competition

  Discussion: html/css

Discussion: HTML/CSS,  "JavaScript Placement"  Please respond to the following: Compare and contrast the process of adding JavaScript and a Cascading Style Sheet to a Website. Determine if they can be used simultaneously in a page. If so, explain wh..

  Complete a request for system services

Objectives Complete a Request for System Services form, which triggers the preliminary investigation phase. Analyze a user interview and extract pertinent facts, which can be used to assess project feasibility. Complete a Problem Stateme..

  Create child processes

Create child processes

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd