Help needed with some questions

Could ye guys help, I have some questions and I dont know the answers of them! any solutions would be great

Distinguish between composition and inheritance as used in object-oriented programming. As part of your answer, provide examples of different situations in which each would be more appropriate.

What is meant by recursion as an algorithmic strategy in working with abstract data structures, and why is such an approach considered worthwhile? Illustrate your answer with an example sorting algorithm in Java that can be sorted linearly and recursively.

Given an alphabet of {x,y,z} possessing the following frequency distributions {1/8, 1/4, 5/8}, show how this information may be used to construct a prefix code binary tree. Given the code 11000111100, show how this is decoded using this construct.

Any ideas??