This is a simple and intuitive calculator application built using Kotlin and Jetpack Compose. Inspired by the iPhone calculator, it supports basic arithmetic operations with a clean and minimalist user interface. The application ensures a smooth and user-friendly experience by displaying only the current number during input and performing calculations efficiently.
The following required functionality is completed:
- User can perform basic arithmetic operations: addition, subtraction, multiplication, and division.
- User can clear the current input.
- User sees the result of the operation when the equal button is pressed.
- User sees the number '0' on the screen when the clear button is pressed.
- User can toggle between positive and negative numbers using the +/- button.
The following extensions are implemented:
- Output is limited to 6 digits after the decimal point.
- The app displays only the current number during input, similar to the iPhone calculator.
- The app handles edge cases such as division by zero.
You can download the APK file for this application using the link below:
Here's a walkthrough of implemented user stories:
Challenges I encountered while building the app.
- Ensuring the calculator only displays the current number during input, similar to the iPhone calculator.
- Handling the correct operation of the clear button to reset the display to '0'.
- Limiting the output to 6 digits after the decimal point for better readability.
- Managing edge cases like division by zero and ensuring the app handles such scenarios gracefully.
MIT License
© 2024 Durgesh Tiwari
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal with the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
