As an example, you will create a simple encyclopedia, where you can add entries, as well as show its full content. The encyclopedia can contain millions of entries, so it is crucial to provide its users with the possibility of browsing entries in the correct order, alphabetically by keys, as well as finding entries quickly. For this reason, the sorted dictionary is a good choice in this example.
The idea of the encyclopedia is shown in the following diagram:
When the program is launched, it presents a simple menu with two options, namely [a] - add and [l] - list. After pressing the A key, the application asks you to enter ...