CMPUT301W15T12 / C301Project

Apache License 2.0
3 stars 2 forks source link

Add your name the codes you have worked on #18

Closed qsjiang closed 9 years ago

qsjiang commented 9 years ago

Hey guys,

In order to communicate better, make sure to add your name to the codes you have been working on.

If you modified a code add your name as well.

Jim

qsjiang commented 9 years ago

BTW who created User class and UserList class?

There are some modifications I need to make, but I would like to consult the original author first.

vanbelle commented 9 years ago

I made them, but i did them pretty quickly so changes should be fine.

qsjiang commented 9 years ago

Hi @vanbelle

Just a quick question before I make any changes

Whats is your original intention for these two private variables inside the user class?

private ClaimList toClaim;
private ClaimList toApprove;

Thanks

Jim

vanbelle commented 9 years ago

its so that every user can have a list of claims that they have made themselves and so that they have a second claim list containing any claims they have to approve. Since these lists will not be displayed together i thought it would make sense to have 2 separate lists for them.

ViIIager commented 9 years ago

Did you mean ArrayList? Because what that is doing is using the Class ClaimList with all its claims and assigning it to two variables which will be used to instantiate the class later.

I think what you wanted to do is create an arrayList and when you click submit, it will no longer be in the owner list, but will be placed in the approve list. Am I misunderstanding?

qsjiang commented 9 years ago

@vanbelle I see what you were going for. Here is what I would do, let me know if you agree or not

  1. Claims are not submitted to a specific approver, so instead of having a ClaimList inside each user, there should only be one ClaimList through out the program. So both "private ClaimList toClaim" and "private ClaimList toApprove" should be removed from the User class. More info see this eclass Discussion: https://eclass.srv.ualberta.ca/mod/forum/discuss.php?d=463827
  2. Claim class should be the model keeps track of who created the claim or who approved the claim, The Claim class will have private variables storing different users. (note by java's default behavior this private variable will just be a reference, not a local copy, so we can still ensure one copy of user data through out the program. You can think it like a foreign key.)
vanbelle commented 9 years ago

That sounds fine to me, i just made them as an idea when i was writing up the test cases for the approver. Do you think then that we could implement in ClaimList a function like getApprover List(ApproverName), which finds the sublist we want to display? Would this be better?

qsjiang commented 9 years ago

@vanbelle yes that would be better. A function gives you a subset of claims filtered by user (or other attributes depending on the situation.)