I am open to any kind of feedback on code quality, and I’m still testing whether the code works logically. As of now, everything compiles and most observable cases produce the expected output. Therefore, I want the code here to be checked not for logic errors(unless there is some fatal flaw you observe) but instead for code quality. Do inform me if more code or some clarification is required for a better review. Thanks in advance.