Skip to content

Conversation

@kenny6789
Copy link

In the addB function, I have rewrote the code to calculate the special needed. Basically, I think that we could combine the calculation for Special Item A and B in just one function(DiscountItems) because in general, ItemA and ItemB are similar to calculate. Furthermore, there is no calculation that used to make discount in ItemA.

Also, the function AddItemC isn't checked the maximum number of Items C, so I have updated this function. In the Total() function, I have added a variable that used to check the current number of item C.

I have rewrote the code of addB to DiscountItems and updated AddItemC. Also, in Total() function, I have added a variable 'noOfItemsC' to keep track the maximum number of ItemC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant