I have produced an order form that allows the user to type in the quantity of various items and there is a running total.
I now need to display and give a discount of 5% on the running total once it hits £100 pr higher.
I have a subtoal (A) and a discount (B) and a final total (C)
if A is less than £100 then B is to display 0.00 and C will show the amount in A
if A is £100 or more than B gives a 5% discount on the amount and the total A - B = C
Also to add to this the customer has also requested that if two packs of an item are chosen then a different item is free.
Buy two of product (P) and get a free dispenser (D)
so if the user type in 1 of (P) and 1 of (D) they are charged for both items.
If the user puts in 2 of (P) then they get (D) and for free but this needs to be shown that (D) is ordered as well.
if they order multiples of 2 of (P) then they get the same number of (D) for example 2 x (P) = 1 free (D)
4 x (P) = 2 free (D) and so on.
Where would I even start with this?
I am learning Java but this is probably a couple of chapters ahead of me.