ICS 22 Project 4

Wow, that sucked. I turned it in at 11:58 and didn’t finish commenting. I had a lot of trouble interpreting the instructions. When time came down to, I just grabbed a working bundle of source and turned it in. I had multiple ones, and while some seemed better code-wise, all but one gave different outputs than that on the website.
The one I turned in first checked if customers should be added to the lines and if so, added them. Then, for each window it did the following checked if there was a customer at the window. If so, it processed him or her. If not, it would move someone from the line into the window. I don’t know if it was right or not.
I did, however, become happy with my clock. If I pass around an int to keep track of time, methods could change it. If I make a clock object with a private int to keep track of time, a public method to change the time, and a public method to retrieve the time, any method could still change the time. So, I made a Clock class with the field/methods described above. Then, I made a ClockView interface that was the same except didn’t have the method to change the time. In Simulation, I did the following:
Clock clock = new Clock();
ClockView clockView = clock;
Now, using the clock reference I could change the time. If I pass the clockView reference to other methods, they can view the time but not change it. Yay!
We’ll see how I actually do.