One day I sat down and wrote out a little eight-bar melody in E minor, and then wrote a counterpoint to it.
I then wrote a counterpoint to that, and yet another counterpoint to that.
The four eight-bar melodies then ended up passed from part to part, moved into different octaves, eventually being played by both violins in turn, the viola, and the cello.
The original melody was given to the cello and the first violin in turn with a simple accompaniments. The complete set of four melodies was then reprised.
The final problem to be solved was how to end the piece, as it always came to rest on the subdominant. A rewrite of the final measure delivers a cadence that tells the listener the little piece is done.