If I want to pass the vendor's name instead of object's name


#1

Hello

In the code, the function "applyStaffDiscount" works when you pass as a paremeter a Object "me"

cashRegister.applyStaffDiscount(me);

But if I want use the value's object for example "John" what changes do I have to do in the code?


#2

Does me represent you, an employee? If you want the discount for john, then you would use an object that represents the employee john


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.