Skip to content

A calculator app made for the Introduction to Mobile Application Development (IMAD) module.

Notifications You must be signed in to change notification settings

YayoKB/Calculator-App

Repository files navigation

🧮 Calculator App 🧮

Overview

Screenshot of the Calculator App interface

💼 Project Brief

Native Android apps can do almost anything. From an e-commerce store app to an app that stores notes to a camera app to games. Your imagination is the only limit. Our app for the purpose of this Portfolio of Evidence (PoE) will be a calculator. We will start simple with just addition, subtraction, multiplication, and division, and add more features to the app throughout the semester.

Technical details

🖥️ Tech stack used:

  • Kotlin
  • Android Studio

❔ Why we used this stack:

This project formed part of the Introduction to Mobile Application Development module where we had to develop our app in Android Studio using Kotlin. Therefore, Kotlin and Android Studio were used.

📓 Requirements

Pages / Functionality

  • Main Screen
    • Enter 2 numbers
    • Addition: Add the 2 entered numbers
    • Subtraction: Subtract the 2 entered numbers
    • Multiplication: Multiply the 2 entered numbers
    • Division: Divide the 2 entered numbers
    • Square Root: Calculate the square root of the first entered number
    • Power: Calculate the first number to the power of the second number
  • Statistics Screen
    • Allow the user to enter up to 10 numbers stored in an array
    • Allow the user to clear the entered numbers
    • Calculate the average of the entered numbers
    • Find and display the minimum and maximum of the entered numbers

Other requirements

  • Error checking and validation, such as dividing by zero and performing calculations on an insufficient amount of entered numbers
  • The Power, Average and Min/Max functions had to make use of loops instead of the built-in Kotlin.Math methods

🔄 Process

I. Part 1

  1. Create an Android Studio project with Kotlin as the language
  2. Add inputs, buttons and display text
  3. Implement the addition, subtraction, division and multiplication functions

II. Part 2

  1. Add and implement the power and square root functions
  2. Add error checking and validation for all of the functions

III. Part 3

  1. Add and implement the statistics screen
  2. Implement the number array, average and min/max function
  3. Add error checking and validation for all of the statistics functions

✨ End Result

  • 100% for Part 1 🎉
  • 100% for Part 2 🎉
  • 100% for Part 3 🎉

🤓 What I learned

This was my first time working with Kotlin and it was a rather pleasant experience. My highschool IT experience paid off as I easily understood what I needed to do and how to do it. I learned about toasts and changing/opening new activities in Android apps, while reinforcing my programming knowledge.

🙃 What I struggled with

...Nothing really? That is very boastful to say but it's the honest truth. This module had the most smooth-sailing. :)

About

A calculator app made for the Introduction to Mobile Application Development (IMAD) module.

Topics

Resources

Stars

Watchers

Forks

Languages