Explain the SOLID principles and provide a real-world scenario where you applied them to improve a system's design.