interest calculation

前端 未结 1 818
轮回少年
轮回少年 2021-01-25 02:21

Here\'s what I got. A linkedList of objects of Customer class of different account types (Savings,current and fixed). Each Customer object has a LinkedList of transactions(anoth

1条回答
  •  生来不讨喜
    2021-01-25 02:54

    Your code has trans.getItem(i).AccType.equals("Crebit") in two places. Presumably that should be Credit. If the value of the AccType field of the transaction items is using the correct spelling, then your if blocks won't "see" the credit transactions when computing the interest and that could lead to a wrong answer.

    0 讨论(0)
提交回复
热议问题