SOLID is a mnemonic for five design principles intended to make your code more flexible, maintainable, and reusable.
A class should be responsible for a single functionality of your code. Therefore a Class should have only one reason to change.
Without applying the SRP, we risk breaking the working code while modifying other functions that don’t belong in the Document class.
A class should open for extension but closed for modification. We should always aim to write a Class in which we can extend its behavior on-demand and not modify its code repetitively.