Projects

Calculator

Java 11 library (Maven) for stack-based arithmetic: standard and reverse-Polish calculators, typed stacks and entries, and JUnit 5 as the way you run and verify the code (no public main method).

GitHub

Calculator

Purpose

A software engineering exercise centred on stacks, expression evaluation, and disciplined error handling. The assignment is intentionally a headless library: there is no main method, so the product is validated by compilation, JUnit 5, and optional Javadoc, not by clicking through a GUI.

What It Provides

Composable number, string, and operator stacks hold typed entries; symbols and operand types model what goes on the stack. One calculator evaluates conventional infix-style expressions; another handles reverse-Polish notation. Custom exceptions for empty stacks, bad types, and invalid expressions make failure explicit instead of returning garbage values.

What I Built

Source lives under the usual Maven layout with a matching test tree beside it. The build targets Java 11 via Maven. You run the full test suite to exercise the library, compile alone to check the model, and can generate Javadoc into the build output when you need API documentation.

My Role

I delivered the library and tests as the core submission: separating stack mechanics from parsing and evaluation, and routing failures through typed exceptions so reviewers can see exactly what went wrong.

How I Contributed

I leaned on tests to pin behaviour for edge cases (empty stacks, wrong token types, malformed expressions) and kept the public API tight enough to discuss in seminars, with room to add a thin CLI or UI later without rewriting the stack model.

Future Enhancements

Future work would include experimenting with GUI libraries to build a full interface on top of this calculator engine, and continuing to explore Java beyond the coursework baseline.

Tech used

  • Java
  • JUnit
  • Maven