Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
me and a couple of friends discussed below two points ,,, but i think we need some body else's idea bout them
1- in the below code we can not say that TestIt class Has-a animal since ( Animal a = new Animal();) is declared inside a method... please confirm
2- in the below code we can not say that TestIt class Has-a Dog when line one is invoked ,,, and we can not say that TestIt class Has-a Animal when line tow is invoked, please confirm
``Worry does not empty tomorrow of its sorrow; it empties today of its strength.''
Seetharaman Venkatasamy wrote:can you justify your answer?
well, this is what i get from our discussion
1- for the first case since the Reference variable is declared inside the method it will get vanished as the method runs and completes.
2-for the second case HAS-a only concerns the Reference variable not the Object being created.
``Worry does not empty tomorrow of its sorrow; it empties today of its strength.''
Seetharaman Venkatasamy wrote:can you justify your answer?
well, this is what i get from our discussion
1- for the first case since the Reference variable is declared inside the method it will get vanished as the method runs and completes.
2-for the second case HAS-a only concerns the Reference variable not the Object being created.
When only line 1 is present in the class TestIt, we can only say that TestIt HAS-A Animal. We can't say TestIt HAS-A Dog as we can't use a Dog-specific stuffs in the class TestIt.
With only line 2, its obvious that the class TestIt HAS-A Dog.
This one time, at bandcamp, I had relations with a tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss