Final answer:
The task involves creating an Ada package called 'polylink' with two subprograms: 'readPOLY()' to read and store polynomials in a linked list, and 'writePOLY()' to display polynomials in a human-readable format on the screen.
Step-by-step explanation:
In the context of Ada programming language, the task is to write a package named polylink that is capable of performing operations on polynomials represented using linked lists. Specifically, you need to create two subprograms: readPOLY() and writePOLY(). The readPOLY() subprogram will handle the input and construction of the polynomial's linked list structure. The writePOLY() subprogram will output the polynomial to the screen in a readable format, such as '3x⁵- 2x³ + x² + 4'.
Here is a simplified version of what this package might look like in Ada:
package polylink is
type Node;
type Node_Access is access Node;
type Node is record
Coefficient : Integer;
Exponent : Natural;
Next : Node_Access;
end record;
procedure readPOLY(P : in out Node_Access);
procedure writePOLY(P : in Node_Access);
end polylink;
Within the readPOLY() procedure, you would prompt the user for coefficients and exponents and create nodes accordingly, linking them together to form a linked list representing the polynomial. The writePOLY() procedure will involve traversing the linked list and outputting the values with the appropriate formatting. This implementation would utilize Ada's strong type system and encapsulation to create a reusable and well-organized solution for polynomial arithmetic.