Write a cpp program to implement a queue using linked lists

Assignment Help C/C++ Programming
Reference no: EM131479723

Assignment: Stacks and Queues (Data Structure U4)

4-6 pages of C++ source code file

Write a C++ program to implement a queue using linked lists. The program should provide the following functionality:

• Enqueue data into queue
• Dequeue data from queue
• Print data at the front
• Print data at the back
• Print the entire queue
• Check if the queue is empty
• Print the number of elements in the queue

Test your program using at least the following test cases (considering the queue includes integers):

1. Check if the queue is empty: Option F.
2. Enqueue 7 into the queue: Option A.
3. Enqueue 4 into the queue: Option A.
4. Check if the queue is empty: Option F.
5. Dequeue data form the queue.
6. Print the number of elements in the queue: Option G.
7. Enqueue 5 into the queue: Option A.
8. Print the number of elements in the queue: Option G.
9. Check if the queue is empty: Option F.
10. Print data at the front: Option C.
11. Print data at the back: Option D.
12. Print entire queue: Option E.

Reference no: EM131479723

Questions Cloud

Ethical issues for it security personnel : What about screen capture programs so you can see everything thats displayed? Should users be informed that theyre being watched in this way
What approaches to resolving this conflict are appropriate : You work part-time at the customer service desk at a home improvement store in your suburban town. What approaches to resolving this conflict are appropriate?
A weapon of mass destruction : Response plans should address these components. Health response requires cooperation with all state and local health agencies including private health care.
Paper about psychological empowerment : Write a 6 page paper about psychological empowerment (empowerment in general) and how it is relevant to the workplace.
Write a cpp program to implement a queue using linked lists : Write a C++ program to implement a queue using linked lists. The program should provide the following functionality: Print the number of elements in the queue.
Read about electronic whiteboards : And read about electronic whiteboards. What advantages and disadvantages do you see in using a whiteboard during a meeting?
What is denso automotive : What is Denso Automotive ? Describe background about Denso?
Porter diamond of national advantage : What are the four factors described in Porter's diamond of national advantage? How do the four factors explain why some industries in a given country.
Honest direct negative feedback : Please describe an approach to communication that one might use to help him/her give honest direct negative feedback while producing minimal defensiveness.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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