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 vhdl code for soda vending machine

Write a VHDL code that implements the above soda machine. You have to turn in the following: A state diagram showing the implementation of your design. Clearly show all the states and the conditions on which transitions occur.

  Using the irvine32 library functions

Create 32 random points which have (x, y) co-ordinates

  Build a student record managing system application

Build a student record managing system application

  Programming problem

Programming Problem can be solved by a program that performs three basic tasks-Input Data, Process Data, and Output Results.

  Top-down recursive descent parser

Write a hand-coded top-down recursive descent parser.

  Development of the current strategic potential of airline

Evaluate the organisation's current external and internal strategic position

  Write the code required to analyse and display

Engineer for a materials manufacturing research lab and have been asked to provide an automated solution to analyse data.

  Two-level memory cache hierarchy

Explain how you would pipeline the four following pairs of statements.

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a multi-threaded competition

Create a multi-threaded competition

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

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