Description
This program allows EBCDIC to ASCII and ASCII to EBCDIC translation of a string. It uses two maps, one with the EBCDIC code as key (E2AMap) and one with the ASCII code as key (A2EMap). It converts from EBCDIC to ASCII by finding the element whose key matches the EBCDIC code in E2AMap (which has the EBCDIC code as key) and taking the ASCII code information from that element. It converts from ASCII to EBCDIC by finding the key that matches the ASCII code in A2EMap (which has the ASCII code as key) and taking the EBCDIC code information for that element.
Concept
This program is a sample to demonstrate the use of the default class IMap in connection with element operation classes.
Task
This program uses maps to translate strings from EBCDIC to ASCII and from ASCCII to EBCDIC.