Solution: The Single Responsibility Principle
Understand how to apply the Single Responsibility Principle by refactoring a Python class to separate data handling and computation. Learn to divide responsibilities between classes to improve code readability and maintainability.
We'll cover the following...
We'll cover the following...
Solution overview
We have refactored the Student class in the following manner:
Code explanation
Our class Student originally handled two different ...