Write template classes for managing generic stacks and queue

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

Assignment: Generic Stacks and Queues Requirements

Stacks and queues are important data structures in the fields of digital design and computer architecture. This assignment is based on Exercise 3.11.3 in the textbook.

Your task is to write two template classes for managing generic stacks and queues, based on the following requirements:

- Create and submit the files MyStack.h and MyQueue.h (remember that .cpp files are not allowed when defining templates). Ensure that the MyStack and MyQueue classes work properly with the int, float, and char datatypes.

- The maximum size of the stack or queue shall be hardcoded as 10.

- Each class should provide the following public member functions:

o default constructor
o peek: non-destructively returns the value on top of the stack or at the front of the queue. An exception handler should return an arbitrary value and print an error message if the container is empty.

o pop: remove one element from container and return it
o push: insert new element into container
o clear: delete all entries from container
o size: number of elements in container
o full: returns true if the container is full
o empty: returns true if the container is empty

- Overflow and underflow must be handled via exceptions.

Attachment:- Program.rar

Reference no: EM131909412

Questions Cloud

What is the advantage of using panel data : What is the advantage of using panel data in a certain situation rather than pure cross sections or time series?
Develop an er diagram to represent the database model : After that, you are asked to design and develop an ER diagram to represent the database model of the database idea you proposed.
Overall significance of the regression : What is the overall significance of the regression? Which test do you use? And why?
What is your campaign slogan : Design a campaign sign and include it in your paper. Think about what information needs to be on it to draw voter attention.
Write template classes for managing generic stacks and queue : write two template classes for managing generic stacks and queues. The maximum size of the stack or queue shall be hardcoded as 10.
Important factor in determining movie revenues : Another important factor in determining movie revenues is genre. Certain film types such as comedies might have a broader appeal than other types
Compute the mean-variance-skewness : Suppose that P .3 Compute the mean, variance, skewness, and kurtosis of x.
What are two ways to create a text box in ms word : What are two ways to create a text box in MS Word? Why would you want to use a text box in MS Word? Provide at least three examples.
Issue of competition between members of society : Describe four common methods countries use for allocating resources and explain how each addresses the issue of competition between members of society.

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