I want to make a composition with two objects. I can do it with objects nesting:
object Composition {
object SomePartOfComposition {
// some body
}
}
But the body of SomePartOfComposition is such long, that I want it in a separate file. How can I do that?
// edit
I know, that I can use trait. But I want strict one to one relation – it is a singleton.
1 Answer