DEV Community

Aaron
Aaron

Posted on

Phase-3-FlatIron

In phase 3 beginning to learn Python we were learning about Object-Orientented Programming. With OOP we were able to represent data by using class methods. By doing this we were able to create data for a given class.

In my final project I used the class methods to initiate the class for the person and the monster to give it its unique attribute. This helps with organizing complex programs to help mimic real world situations. With class methods you can also make a class inherit the other class init from one another, which I feel like helps us any programmer/ developer to handle and modify.

When trying to understand OOP and class methods in Python it is much more efficient and easier to manage. Within my final project using a cli it was very helpful to be able to just refer a init of a certain class after creating a class method and quickly being able to refer to it later on for the project. Being able to use property and setters to handle whether a class and its init is immutable or mutable helps a lot to when a user is not allow or has certain criteria’s to meet when declaring a certain lets say a age or name for the class.

Top comments (0)