Bug 425 - Record Transaction to Wrong Category
Summary: Record Transaction to Wrong Category
Status: RESOLVED FIXED
Alias: None
Product: Group 3
Classification: Unclassified
Component: Personal Finance Mangement (show other bugs)
Version: unspecified
Hardware: PC Windows
: Normal major
Assignee: ryanyen2
URL:
Depends on:
Blocks:
 
Reported: 2020-11-21 10:31 HKT by ryanyen2
Modified: 2020-12-04 21:00 HKT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.