CS61A: How to do OOP WWPP problems

Here’s an psudo-environment diagram I drew for this WWPP problem to illustrate how to keep track of instance variables and stuff. In summary:

  • Draw class on the left and instance on the right
  • Use arrow to indicate parent class / an instance belongs to a class
  • Highlight the class name to remind yourself

FullSizeRender.jpg

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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