posted 1 year ago
In this implementation I must produce a carousel run, which limits number of calls to the next method. When the limit of calls reached carousel run must consider itself finished.
Carousel Run class:
Decrementing Carousel class:
DecrementingCarouselWithLimitedRun class
DecrementingCarouselWithLimitRun class:
This is Main class:
When I'm running the code I get:
But it should be:
How I stop the code to run only for a limited times?