Rewrite the code of Figure 7.3 in Ada, Java, or C#. Figure 7.3: template class queue {

Question:

Rewrite the code of Figure 7.3 in Ada, Java, or C#.

Figure 7.3:

template class queue { item items [max_items]; int next_free, next_full, num_items; public: queue () : next_free (0), next_full(0), num_items (0) { } bool enqueue (const item& it) { if (num_items ++num_items; items [next_free] == max_items) return false; it; next_free (next_free + 1) % max_items; return true; } bool dequeue (item*

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: