Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C# using System; using System.Collections.Generic; namespace ConsoleApplication1 { class OurQueue : IEnumerable { private int front, end, size; private T[] myArray; public OurQueue(int capacity

IN C#image text in transcribed

using System; using System.Collections.Generic;

namespace ConsoleApplication1 { class OurQueue : IEnumerable { private int front, end, size; private T[] myArray; public OurQueue(int capacity = 10) { myArray = new T[capacity]; } public void Clear() { front = 0; end = 0; size = 0; } public bool IsEmpty() { return size == 0; } public T Dequeue() { size--; T data = myArray[front]; Increment(ref front); return data; } public void Enqueue(T newItem) { if (this.size

public IEnumerator GetEnumerator() { int position = front; for (int i = 0; i 1. In main method, create a queue that has it's data crossing the "gap of death". In other words, the data in the queue wraps around the end of the array. In other words, part of the data is stored in the back of the array and part in the front of the array. 2. Create an Contains method to add to the OurQueue class. It must return true if the value passed to the method is in the Queue, otherwise it must return false. 1. In main method, create a queue that has it's data crossing the "gap of death". In other words, the data in the queue wraps around the end of the array. In other words, part of the data is stored in the back of the array and part in the front of the array. 2. Create an Contains method to add to the OurQueue class. It must return true if the value passed to the method is in the Queue, otherwise it must return false

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

1. Write down two or three of your greatest strengths.

Answered: 1 week ago

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago