In my opinion, an AssertionError
would be incorrect to use here.
From the docs, an AssertionError extends base class Error
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
An error should be fatal, whereas I would expect your program to handle this, and display the user a warning message about the unknown operation.
If anything here, I would expect an UnsupportedOperationException to be thrown, and handled elsewhere in the call stack.
Thrown to indicate that the requested operation is not supported.
Consider the case where, not in a calculator, but any code flow that uses ENUMs:
If a developer were to add a new value to an existing enum, I would not expect functions that make use of this existing enum to invoke an error, just because the new value is not supported.