4 ms·
I didn't write this so I am not in a good place to argue in favor or against any pattern, but the obvious answer here would be the needs of the application just
by CGamesPlay 11y ago
I didn't write this so I am not in a good place to argue in favor or against any pattern, but the obvious answer here would be the needs of the application justify a Singleton. The app doesn't support more than one Calculator, adding additional object management for a feature that isn't necessary is strictly wasted effort.
I don't think it's a "key event" in the sense you're imagining. The store is a black box around a calculator device with emulated physical buttons, so "back key pressed" is one of the store's fundamental actions. I might be wrong about this.