AY2425S1-CS2113-W14-1 / tp

0 stars 5 forks source link

Implement storage for IncomeList and SpendingList #31

Closed TPH777 closed 1 week ago

TPH777 commented 2 weeks ago

Income and Spending will extend a new class Type, as they share similar attributes and methods.

During initialisation of storage in main, Storage will initialise incomes, spendings and password to restore data. Both IncomeListStorage and SpendingListStorage will serialise when load (at the start) and deserialise when save (at the end). -It is not implemented as one class due to the complexity of the data type, for example, IncomeList extends ArrayList<Income> and Income extends Type. This means that 2 generics have to be used.

LoginStorage will take the hashed password at the password.txt file if it exist, else it will call createNewUser and create a new file for the newly set hashed password.

closes #21

NigelYeoTW commented 1 week ago

lgtm