Both are wrapping underlying class_Main in new functionality, but in different ways:
The first is composition - class_Object contains an instance of a class_Main, and class_Object can provide its own API that may provide some access to class_Main functionality or use that functionality in a custom way. In summary, class_object HAS A class_Main.
The second is inheritance - class_Extended contains an instance of a class_Main because it IS an instance of class_Main (read about OOP and Polymorphism to see what I mean). Again, additional functionality can be provided around class_Main but the default is to behave as a class_Main with all its APIs, unless they are overridden or extended. In summary, class_Extended IS A class_Main.
The above distinction may help you decide which one to use for your situation.
Read also about Polymorphism for reasons why you might use one or the other.