Java task (Solving problem)
Can somebody help me with this tastk? Im not sure how to start Task description: Pipes are objects, which can be attached to each other, thus forming a cascade of pipes. Data can be fed on one side of the pipe cascade. While the data flows down the pipes, it is processed by the individual pipe objects and finally can be gathered at the draining end of the cascade. The data flow through the pipe cascade can be controlled either from the feeding end (front end) or from the draining end (back end). In the first case, the object at the front end provides methods to feed one or more data elements to the pipe cascade. A call to such a method at the front starts a cascade of further method calls downwards the pipe cascade and finally ends in a last method call at the back end of the cascade. This last method is then responsible for the final handling of the processed data, e.g. writing it to some device. In the second case, the object at the back end of the cascade provides methods to fetch one or several processed data elements from the pipe cascade. A call to such a method at the back end starts a cascade of further method calls upwards the pipe cascade, finally ending in a last method call at the front end of the pipe cascade. This last method call fetches a new data element e.g. from a pool, where the not yet processed elements are stored (e.g. an array). It is also possible, that the front end is endlessly producing new data elements. The second approach is often combined with a technique called lazy evaluation, which means that data is only processed when it is required and methods are only called when necessary. In this task you will implement such a pipe processing system for integer values, using the second approach. By doing this you will get an idea how java streams work Class Descriptions Abstract Class Pipe involves getFeedingPipe, hasNextInteger() Returns true if there are more integer numbers ready to be fetched, nextInteger() Returns either the next integer number, or null Class Feeder method nextIn