Skip to main content

Posts

Showing posts from December, 2019

A list of commonly used roles and functionalities in object oriented programming

Lately I started working on a new project at work. We just started laying the foundation for everything and I ran into the problem of how to assign general responsibilities to various components in the code so that we establish some sorts of patterns and standards used everywhere in the code. Some roles and functionalities were already defined, I found this really useful so I decided to write this post. I still have a lot of things to learn. Having an uniform code with a similar structure everywhere makes it really easy to understand. Also having clearly assigned roles to objects makes it easier to understand. 1. "Calculator" functionality If you have a class in which you do some kind of mathematical calculations and comparisons then you should add this in the class name. In general it encompasses some kind of mathematical formula. For example at one point I had to calculate how much fluid I had to allocate for some tubes. In general when you deal with numbers, you will