CMPUT301W15T12 / C301Project

Apache License 2.0
3 stars 2 forks source link

Claim ExpenseList #20

Closed ViIIager closed 9 years ago

ViIIager commented 9 years ago

Why did you create a class called ExpenseList and TotalList? Why not just create the lists in the Claim Class? I mean, instead of doing

private ExpenseList expenseItems

since we have an expense class, why not do

private ArrayList expenseItems;

then initialize it. there are less initialized classes floating around and we do not need to worry about anything else once we are in the claim class, just retrieving the information. why do you need to have a class just for a list of things you are never going to affect directly? I mean, we dont really have any custom implementation of the expenseList other than adding and deleting or editing, which can all be done with the default methods in the ArrayList class.

vanbelle commented 9 years ago

I did this because when I tried to implement what you suggested in my assignment 1, I had two problems with it. The first was that I had a lot of trouble getting the lists to save properly when inside the claim, the second problem I had was that my Claim class was HUGE and I could never find any of my functions back when I needed to edit them. However, if as a group we think your described method would work better, then I am not opposed to changing it.