for TuanVM
A simple calculator is a small program used to perform basic operations of arithmetic. It imitated hardware calculators by implementing the same functionality with mouse-operated, rather than finger-operated, buttons. Such software calculators first emerged in the 1980s as part of the Windows operating system.
The simple calculator can perform basic arithmetic operations such as: Add, Subtract, Multiply and Divide Square root (√), %, and 1/x. The operands are positive/negative integer or decimal numbers. It also supports:
- M+ add to value stored in memory,
- M- subtract from the value stored in memory,
- MR display the value in memory
- MC clear the value in memory
Use JFrame, JButton, JTextField, JLabel components and Math.sqrt() function.