Rewrite the code of Figure 7.3 in Ada, Java, or C#. (a) Give a generic solution to Exercise XXXXXXXXXXb) Translate this solution into Ada, Java, or C#. In your favorite language with generics, write...

Rewrite the code of Figure 7.3 in Ada, Java, or C#. (a) Give a generic solution to Exercise 6.19. (b) Translate this solution into Ada, Java, or C#. In your favorite language with generics, write code for simple versions of the following abstractions: (a) a stack, implemented as a linked list (b) a priority queue, implemented as a skip list or a partially ordered tree embedded in an array (c) a dictionary (mapping), implemented as a hash table 7.12 Figure 7.3 passes integer max_items to the queue abstraction as a generic parameter. Write an alternative version of the code that makes max_items a parameter to the queue constructor instead. What is the advantage of the generic parameter version? Rewrite the generic sorting routine of Examples 7.50–7.52 (with constraints) using OCaml or SML functors.

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here