Overview

A calculator mobile application developed as part of my academic projects.

Available in both simple and scientific layouts, my calculator provides an efficient and responsive space to do the math for you.

Development Environment

  • Java for logic and XML for UI design
  • Android Studio
  • Mxparser library for parsing and evaluating mathematical expressions.

Features (Again, it's only a calculator...)

My calculator includes the following functionalities:

Basic Arithmetic Operations

Addition, subtraction, multiplication, and division.

Extended Features (some currently placeholders, meaning that they are not implemented yet...)

  • Scientific calculations (e.g., sine, cosine, logarithms).
  • Operations like factorial, modular arithmetic, and power functions.
  • Special constants such as π and e.
  • Parentheses for complex expression evaluation.

UI Design

The user interface is built using XML files that define a grid-like structure for the buttons and display area:

  • Buttons for numbers (0–9), arithmetic operators, and special functions.
  • A text view (TextView) for displaying input and results.
  • Layouts:
    • ConstraintLayout for responsive positioning of buttons.
    • HorizontalScrollView for scrolling input/output if content exceeds the display width.

Functionality Implementation

  • Logic and Interaction
    • Buttons are dynamically linked to their respective listeners using findViewById.
    • Mathematical operations are handled by parsing the input string using the Expression class from the mxparser library.
    • Error handling for invalid inputs or undefined results.
  • Key Code Highlights
    • Dynamic Button Setup: Buttons are initialized in a dedicated setupElements method.
    • Mathematical Parsing: Input strings are parsed and evaluated using Expression objects, returning results or error messages.
    • Custom Operator Handling: operation() manages chaining operations like value1 + value2.

Challenges and Areas for Improvement

  • Unimplemented Features: Buttons for advanced functions (e.g., sin, log) currently display a placeholder message "not implemented yet...".
  • Future Work
    • Fully implement all planned scientific features.
    • Optimize the parsing logic for better performance with complex expressions.
    • Extend support for additional mathematical functions such as matrix operations.
    • Incorporate accessibility features, like voice input or high-contrast mode.

Demo

Please find the live demonstration of my calculator in this link.

Screenshots

Conclusion

This calculator app demonstrates a foundational implementation of a robust mathematical tool for Android devices. While it offers essential functionalities, further refinements in both UI and feature set will enhance its utility and user experience.

Grid evaluation

Elements from the excel file that I worked on:

(Please click on the ticks for more details, also please note that non clickable ticks are implementational and for code only.)

Rapport Principes UX - Joel Marsh
Critique travail
Presentation innovation
Rapport GitLab Pages
Indications de ce qui est fait
Test unitaire Nommage
Effort fonctionnel
Technique Test avancées
Application Responsive
Vert/Horizontal
Ne crash pas
Installation sur tel
Resources pour constantes
Usage pertinent Layout
Service/Thread
Calculatrice Javascript Engine ou equivalent
Analyse de vulnérabilité CVE des dependances
Proper blinking effect
RSS Volley / Picasso
SAX ou DOM / Ou JSON - REST
Acces une base de donnée
ROOM
Static config file
Caffeine / google.common.cache
Bonifications Collaboration
Config CICD (main forcee)
Recherches personnelles
Qualité de rapport Professor's judgement
MVVM
Deploiement PlayStore
Internationalisation

Principes UX - Joel Marsh

In my calculator app, I focused on applying Joel Marsh's principles of Visual Design and Functional Layout Design to create a clean and intuitive experience. I used Visual Weight, Contrast, & Depth by making key buttons like "CE" and "=" stand out with bold orange against a dark background, ensuring they grab attention. I also paid attention to Alignment & Proximity, carefully arranging the circular buttons in a consistent grid that groups related functions together, making the layout easy to navigate. From a functional perspective, I designed the interface to follow a natural Z-Pattern and Visual Hierarchy, so users can quickly scan and interact with it. By keeping frequently used buttons easily accessible and visually clear, I feel like I’ve created an app that balances both usability and simplicity.

Critique du travail

I’m proud of the foundation I built with my calculator app, especially the clean UI, responsive design, and functional basic operations. The app works smoothly for arithmetic calculations, and the use of the mxparser library was effective for handling expressions. However, I recognize there’s still room for improvement. Some scientific features are placeholders, which I’d like to implement fully, and the parsing logic could be optimized to handle complex expressions more efficiently. Overall, it’s a strong start, and I’m excited to refine it further.

Technique Test Avancées

I have used the jacoco to mesure my code coverage. The jacoco report file is a generated html that you can find in Calculatrice\app\build\reports\jacoco\jacocoTestReport\html\index.html .

Analyse de vulnérabilité CVE des dependances

I used OWASP Dependency-Check as my dependency vulnerability scanner. The analysis revealed 82 vulnerabilities in the dependencies used in my projects. I have detailed some of them in the table below:

Dependency CVE ID Issue
MathParser.org-mXparser (4.4.2) CVE-2008-3891
Google Guava (28.1-jre) CVE-2023-2976, CVE-2020-8908 Known vulnerabilities in Guava versions related to deserialization issues and insecure configuration.
Apache Commons IO (2.13.0) CVE ID: CVE-2024-47554 Vulnerability related to path traversal and insecure file handling.
Netty (4.1.72.Final and 4.1.93.Final) CVE-2023-44487, CVE-2023-34462, CVE-2022-24823, etc. Multiple vulnerabilities, including DoS attacks (HTTP/2 Rapid Reset) and remote execution risks.
GRPC (1.57.0) CVE-2023-44487 Vulnerability in GRPC related to HTTP/2 processing.