How should you complete the relevant code?
HOTSPOT You are implementing a library method that accepts a character parameter and returns a string. If the lookup succeeds, the method must return the corresponding string value. If the lookup fails, the method must return the value "invalid choice."…