Say you have 5 shopping customers (5 Threads), 3 register lines.
I want to initialize register lines to 0 when the first customer begins to shop.
But after that customer, I want to keep the running count on the registers.
How can I do this? If I put the Register lines counters at the beginning of the code, every time that thread is started, Register Line counters will be set to 0. How can I update it with the latest Register Counter count? Where should I initilize the counters, in another class, then call getRegisterCount?