Object composition (revisited) . Problem: Design a Circle class to demonstrate how a small object is used to create a larger object . Solution: Use Point class as a part of Circle class. - Using an object of one class as part of another class is a powerful way of designing complex objects. . We are said to be using 'object composition' when we do that. . 'object inheritance' is another way of designing complex objects using simpler ones and we will see it later. . For object composition, - see Point.java Circle.java . See how toString is invoked indirectly in the println call in the main of Circle. . Also note that toString of Circle relies on the toString of Point doing its job. Separation of concerns or following the abstraction principle. . Now that you know how composition works, you can apply this concept as you build complex objects in any depth. For example, a student object containing an array of courses the student is taking. A course consisting of many objects, one of which being the professor who is teaching, where the professor itself is represented as an object having an array of students who are advisees, etc. The course also has an array of students who are enrolled in the course. The course also has a classroom object. You get the idea. It can get quite complex! And object composition at work at every level in the design of a system of that complexity.