The correct answer is:
D. The stars are made of similar elements.
Stars that produce similar spectral patterns generally have similar compositions in terms of the elements present in their atmospheres. This similarity in elemental composition leads to comparable absorption lines in their spectra, which is what we observe as similar spectral patterns.