Github Classroom Assignment Link : https://classroom.github.com/a/oUE_Og9m
Tasks Definition : https://docs.google.com/document/d/1V1gYEKLtOPYzZL7F9koaDVdgIlOXl_ALspjyzOZJN7Q/edit?usp=sharing
The idea behind the Solid principle is to manage dependency. 1. SRP => Illustrates having methods that perform single responsibility. The idea is to have methods that perform specific functions to their creation Eg: A function meant to display error messages should not do anything other than that.
2.OCP => When creating a system or method, build it in such a way that it can be extended rather than modified. OCP is a form of abstraction in OOD.
3.LSP => the ability to replace any instance of a parent class with an instance of one of its derived classes without breaking the code
4.ISP => simply says that only methods needed by a derived class should be available from the parent class. For interfaces, it is better to have many interface with fewer methods than have Fewer Interfaces with many methods in them so that they would be no need for a new entire class creation
5.DIP => high level functions should not implement low implementation but both should depend on abstraction. This is to reduce the impact of changes
Mutable | Imuutable |
---|---|
list | tuple |
dict | float |
set | string |
bytearray | bool |
int | |
unicode | |
complex | |
frozen set | |
bytes |