is there any way to write code without using multiple if else if else if else
I’m looking to write robust code without relying heavily on if-else statements and try-catch blocks. I want to handle different scenarios and errors more effectively. Could you suggest alternative design patterns or techniques that can help achieve this?