erikaliang520 / base_KASE

2 stars 1 forks source link

Tentative WordHistoryManager #8

Closed erikaliang520 closed 11 months ago

erikaliang520 commented 11 months ago

I created a class called WordHistoryManager in order to manage the saved history. This class has persisting variables wordHistory and csvFile. wordHistory is a hasmap that maps original words to translated words. I will probably also add original language and translated language as well if we end up adding more languages or after I've figured out to make this part work properly. For now, I have included save methods to save the permanent csv file, getTranslatedWord to find translated words, and clearWordHistory to clear the csv file. I will continually edit this file as we go on, as later, when working on clean architecture, we may want to add interfaces for WordHistoryManager to work off of. Feel free to comment any changes about the code or issues with the code.