We need to add priority based programming in our application using java programming language. For example, there are three priorities that a phone can have: A1, A2 and A3. Also there can be three different types of phone numbers like home (H), office(O) and mobile(M). There have to be default priorities like:M - A1H - A2O - A3Now the priorities will also change based on user preferences. For example, if O comes with priority A1, M and H will change to A2 and A3.What will be the best way to implement this logic without adding too much of if-else processing logic in the code?
What would be the best way to implement priority based programming without adding too much of if-else processing logic
java