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 Unit Testing in Java!
You have completed Unit Testing in Java!
Preview
Let's dive into a couple of ways to reuse code. Should you use inheritance or composition?
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
We for sure want to reuse it, right?
0:00
Well, in practice,
0:00
when you decide to reuse code you have
a couple of options of how you use it.
0:01
Namely, you have to decide between
inheritance and composition.
0:05
Now our bin is basically a queue.
0:09
It's got a couple of ways in
which it works differently.
0:12
Well first off, there's a maximum number
of items that we can put into the bin.
0:14
So we need to limit the total number
of items that can go in there, so
0:18
that when we add to the queue,
we need to check a limit.
0:21
And secondly Tex is pretty particular
about the placement of the bin and
0:24
the grids.
0:28
And one thing is certain.
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