Create a main loop to accepts text commands

Assignment Help Programming Languages
Reference no: EM1351660

Q1) Using the ADT described in Dale p280-282, implement a FIFO Queue. Then create a main loop that accepts text commands as specified below and executes the appropriate FIFO queue functions. Note that you cannot use already existing stack and queue operations or include files. You must implement the ADT using basic data structures (arrays or linked lists). However it is fine to make assumptions similar to your text such as placing a limit on the size of the queue.

Important: Be careful with 'edge' or 'border' cases - for example, what happens when you remove an item and no items are present? You may also overflow your data structure depending on your implementation. In these conditions make sure you print an error on the screen. Your program should not break in these conditions!

Inputs:
new - Initializes the queue.
add <string> - inserts the string into the queue.
remove - removes the next item string (using FIFO) on the queue and prints out the value.
isfull - prints whether or not the queue is full
isempty - prints wether or not the queue is empty

You are welcome to use numeric choices such as 1) new 2) isfull 3) isempty etc to simplify coding of input/output routines so long as the core functionality is there and accessible to the user.

Each of your commands should output confirmation such as "Marty has been added to the queue".

Reference no: EM1351660

Questions Cloud

Example on organizational behavior : Organizational Behavior - What would be some examples, that can do the job for teammates who personalities
Find straight wires cross each other at right angles : Two long, straight wires cross each other at right angles, and each carries same current. Which of the following statements are true regarding the total magnetic field at the various points due to the two wires.
Compute required rate of return : Kish's beta coefficient can be discovered as a weighted average of its stocks betas. The risk free rate is 6 percent, and you believe the following probability distribution future market returns is realistic:
Adolescent development theories : Draw from both articles and discuss the issue of bullying in school and other contexts (for example, internet or technology bullying). Take into account how adolescent development theories to explore possible solutions to the problem.
Create a main loop to accepts text commands : Using the ADT described in Dale p280-282, implement a FIFO Queue. Then create a main loop that accepts text commands as specified below and executes the appropriate FIFO queue functions.
How long will it take the wheel to make one-half revolution : what force is needed to pull a 150 pound sled along a horizontal surface? The coeficient of kinetic friction is 0.10 and the sled is pulled by a rope that makes the angle of 0 degree with the horizontal. There is no acceleration.
Elucidate how levitt devised a means of examining student : Elucidate how Levitt devised a means of examining student test scores to uncover evidence of cheating teachers. Explain also why Levitt's analysis of the data constituted evidence, but not proof, of cheating.
Describe the situation facing mensa : Explain develop a five-year strategic plan with cost estimates and a time line and Describe the situation facing Mensa at the time of the case
Question related to consumer behavior : Statement of objectives and include screening questions to make sure that the interviewers selected are qualified respondents.

Reviews

Write a Review

Programming Languages Questions & Answers

  Program to calculate the electricity bill

Write a program to calculate the electricity bill. The rates of electricity per unit are as follows: If the units consumed are equal or less than 100, then the cost is Rs 8/- per unit.

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Building airline reservation system

Problem Description The aim of this project is to build airline reservation system. System must give two basic sets of services to an airline: First set of services allows the airline to provision its system.

  Pseudocode for linear search by using clrs3e style

Write pseudocode for linear search by using CLRS3e style used in, which scans through the sequence, looking for v.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Program to create professor rating class

Write down program to create Professor Rating class comprising of professor ID and three ratings. Three ratings are utilized to estimate easiness.

  Program to solve roots of quadratic equation

Write down a program which solves the roots of the quadratic equation of the given form:- ax 2 + bx + c = 0. Display the results on screen.

  Create a multi-threaded competition

Create a multi-threaded competition in which opposing Robin Hoods will attack one another and try to take each other's gold coins.

  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.

  Program in visual basic to calculate area of triangle

Write a program in visual basic to calculate area of a triangle.

  Program to display weekly payroll report

Write down a program to display a weekly payroll report.

  Creating message box to display member name

Ddefine for your class is a method to design a message box to display member name, car year and model, and year member joined club.

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