Zleef’s Blog

I wish i was swimming here –but instead, i’ll happily work on my computer science homework…

My adaptation of the Observer pattern

While there’s not a whole lot of excitement going on at the moment with my game, the foundation is now much more concrete. I’ve setup the program to have Customer_Driver notified when the popularity of the soup changes, which will eventually result in an adjustment of how many customers are coming. Currently you’ll see that the driver creates an instance of soup and customer_driver and then proceeds to update the soup’s popularity, which then prints out an acknowledgment from customer_driver that there has been a change.

Advertisement

1 Comment»

  danielmundra wrote @

You turn-in was good enough for now.

Just a reminder as your refactor, use a lot of packages and comment a lot, I don’t want to see sloppy code after a well organized blueprint.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.