Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Java Objects!
You have completed Java Objects!
Preview
You can create computed properties that help to abstract away how your object is working internally.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
that we expect might be a common question
about our object.
0:00
By gathering common functionality,
we can help reduce code duplication
0:02
for ourselves
and for consumers of our code.
0:05
So, more specifically,
if we try and visualize
0:08
how people are going to use our Pez
dispenser object, one common question
0:11
I could foresee happening would be,
is this thing empty?
0:15
Because that is probably going
to be asked of the object,
0:19
we should probably provide the answer
to that common question to our users.
0:21
What we don't want to do is force
the user to understand how our object
0:26
works internally.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up