Bug 425

Summary: Record Transaction to Wrong Category
Product: Group 3 Reporter: ryanyen2 <ryanyen2-c>
Component: Personal Finance MangementAssignee: ryanyen2 <ryanyen2-c>
Status: RESOLVED FIXED    
Severity: major CC: tlhsu2-c, Xavier.edith.lee
Priority: Normal    
Version: unspecified   
Hardware: PC   
OS: Windows   

Description ryanyen2 2020-11-21 10:31:55 HKT
There are 4 main categories extended the class of Transaction, when the user inputs a typical type to record the transaction in. It goes to the wrong one.
Comment 1 Xavier.edith.lee 2020-11-22 18:30:54 HKT
The bug was reproduced by creating new transaction record with User.addTransaction(...). 

Consider studying the condition checking/ switching on the Transaction object creation step in addTransaction(...), may need a better type checking procedure.
Comment 2 Hsu To-Liang 2020-12-04 21:00:49 HKT
This bug happened when the user trying to record expense transactions to the transaction records. It will inherit the wrong type as income transaction, thus I changed the type recognize methods in User.java to correctly recorded the transaction with the corresponding type.