Applying logic to the class responsible for account of hours