Great job on your work, your code is clean and well-structured, but the use of inheritance for Fizz and others is unnecessary since they don't share the same behavior of IsPrimeNumber. You may also consider reusing your class methods inside execute() function to avoid unwanted object creation and to improve efficiency.
sorry but i dont have computer, i use mobile
Great job on your work, your code is clean and well-structured, but the use of inheritance for
Fizz
and others is unnecessary since they don't share the same behavior ofIsPrimeNumber
. You may also consider reusing your class methods insideexecute()
function to avoid unwanted object creation and to improve efficiency.' takes a few less ms to type than " because you don't have to hold shift.