I develop an application in Java Spring. I have an abstract superclass called AbstractPuzzle and I have its children called Wordle and Riddle(I have JOINED type of inheritance).
I get an AbstractPuzzle object from the dedicated repository in order to view it but I want to add the dedicated button for solving a puzzle. Based on the type of AbstractPuzzle object I want to implement different HTML pages with different logic for solving these puzzles. What is the best way to that? Also I use MVC pattern, so I utilize services for processing business logic.