You will need to submit your programs that test both encode and decode.. The first (encode) will input an alphabetic message from a file, and use the class to build the morse code string, and then output the string. The second (decode) will input a morse code string from a file and use the classto build the decoded string, and then output the string. You can download the functions morsecode and alphacode.
Please note, that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.
We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
need help ... understanding this program
That implies that you have not written the code that you have posted. The "copy-paste" is a poor way to program.