Question 1122858
assuming he makes 60,000 salary, then the formula would be:


salary plus commission = 60,000 + .05 * sum of |Di| where i = 1 to the number of transactions.


Di is the value of the ith transaction.


for example:


assume he made 5 transactions, 2 of which were deposits and 3 of which were withdrawals.


assume the deposits were 5,000 and 10,000


assume the withdrawals were 3,000 and 6,000 and 9,000


D1 would then be 5,000
D2 would then be 10,000
D3 would then be -3,000
D4 would then be -6,000
D5 would then be -9,000


the absolute value of the transactions would be 5,000, 10,000, 3,000, 6,000, 9,000.


the sum of the absolute value of the transactions would be 33,000.


his commission would be 5% of that which would make it .05 * 33,000 = 1,650.


his salary plus commission would be 60,000 + 1,650 = 61,650.