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

  Development of the current strategic potential of airline

Evaluate the organisation's current external and internal strategic position

  Show how the tree might be type-checked

Attempt to derive proof tree for the judgment Show how the tree might be type-checked

  Examine the boxplot

Examine the boxplot and briefly discuss the overall pattern of electricity usage for the households.

  Ethics and social responsibility

Ethics and social responsibility at McDonalds

  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.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Hubspot: inbound marketing and web 2.0

Hubspot: Inbound Marketing and Web 2.0

  Html/css

"Validating Your Work" Please respond to the following:  Describe attribute minimization. Explain what would happen if you tried to validate a page containing instances of attribute minimization. Propose a solution to this problem.

  Write functions

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

  Top-down recursive descent parser

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

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Solve the programming problem

Solve the programming problem

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