๐ A fully functional scientific calculator using Stack-Based Reverse Polish Notation, built in Java, designed with Waterfall methodology, and developed in a collaborative software engineering environment as part of a university project.
StackBasedCalculator is a fully-featured Reverse Polish Notation (RPN) scientific calculator developed as part of a team project for a university Software Engineering course. Built with Java and the Waterfall development model, this project demonstrates modular architecture, collaborative coding, and extensive testing.
-
โ RPN (postfix) input processing
-
๐ง Stack-based operations and memory
-
๐จ GUI interface with calculator-like appearance
-
๐งช JUnit test suite for core components
-
๐ UML & Gantt-based planning
-
๐ Developed in a simulated real-world environment
All code comments and internal documentation are written in Italian, as the project was developed during a group exam at the University of Salerno (Italy).
Despite this, the codebase follows international best practices, with clear method names and class structures that make it easily understandable for global developers and recruiters.
-
clear
โ remove all elements -
drop
โ remove top element -
dup
โ duplicate top element -
swap
โ swap top two elements -
over
โ duplicate second-to-top element
-
Basic operations:
+
,-
,*
,/
-
26 memory variables:
a
throughz
-
>x
โ Load top of stack into variablex
-
<x
โ Push value from variablex
onto the stack -
+x
,-x
โ Perform arithmetic with variablex
and top of stack
-
-
Complex number support
-
Rich exception handling (stack underflow, invalid operations, etc.)
-
GUI with custom calculator fonts
Developed over 2 months, this project followed a strict Waterfall model, simulating a professional software lifecycle.
-
โ Requirements Analysis
-
๐ Gantt Chart Planning
-
๐ Design using UML
-
๐ป Development in Java
-
๐งช JUnit Testing
-
๐ Final Release and Live Demo
All milestones and deadlines were met โ reflecting a real-world agile workflow within an academic structure.
Comprehensive unit testing was performed using JUnit, ensuring correctness of:
-
Stack operations
-
Variable manipulation
-
Complex number calculations
Test classes are located in:
test/java/AH/gruppo14/stackbasedcalculator/
You can find documentation and technical reports inside the docs/
folder, including:
-
Requirements Elicitation and Analysis Report: Contains the process of gathering and analyzing the project requirements, outlining the needs and expectations of stakeholders.
-
Use Case Diagrams: Describe specific scenarios in which the system will be used, detailing how users interact with the system to achieve a goal.
-
Activity Diagrams: Represent workflows and processes within the system, showing the sequence of activities and decision points.
-
Class Diagram: Illustrates the systemโs structure, highlighting classes, attributes, methods, and the relationships between different entities in the system.
-
User Manual: Provides instructions and guidance for end-users on how to operate and interact with the system effectively.
๐ฆ StackBasedCalculator
โโโ ๐ docs
โ โโโ 1 - Requirements Elicitation and Analysis.pdf
โ โโโ 2 - Use Case.pdf
โ โโโ 3 - Activity Diagram.pdf
โ โโโ 4 - Class Diagram.pdf
โ โโโ 5 - User Manual.pdf
โโโ ๐ resources/fonts
โ โโโ Calculator.ttf
โ โโโ LEDCalculator.ttf
โโโ ๐ src/main/java
โ โโโ AH/gruppo14/stackbasedcalculator/
โ โโโ BaseView.java, Buttons.java, CalculatorView.java
โ โโโ StackCalculator.java, StackBasedCalculator.java
โ โโโ StackCalculatorController.java
โ โโโ CalculatorStack.java, CalculatorVariables.java, Complex.java
โ โโโ StackView.java, VariablesView.java, SystemInfo.java
โ โโโ ๐ Eccezioni (Custom Exceptions)
โ โโโ StackVuotoException.java, StackPienoException.java, etc.
โโโ ๐ test/java/AH/gruppo14/stackbasedcalculator/
โ โโโ CalculatorStackTest.java, ComplexTest.java, etc.
โโโ pom.xml, .gitignore, README.md
-
@francescopiocirillo (๐ Team Leader)
-
Clone the repo
git clone https://github.com/francescopiocirillo/java-rpn-scientific-calculator.git
-
Open in your preferred IDE (NetBeans, VS Code, IntelliJ)
-
Run
DummyMain.java
to launch the application
- โ Java version: 23.0.1
- ๐ญ JavaFX SDK version: 24.0.1
โ๏ธ For questions or suggestions, feel free to contribute or report any corrections! Open an Issue!๐
Java RPN Calculator, Reverse Polish Notation Calculator, Stack-based Calculator Java, Java Scientific Calculator, RPN Scientific Calculator, Stack operations calculator, Waterfall methodology software, Collaborative Java project, JUnit testing in Java, UML design in Java, Stack-based calculator features, Java complex number calculator, GUI scientific calculator Java, RPN calculator with variables, Java programming university project, University of Salerno Java project, Stack-based architecture, Calculator with memory variables, Exception handling in Java, Postfix calculator Java, Calculator development team project, Software engineering Java project, Open-source scientific calculator, Java programming for beginners, Java unit testing, StackVuotoException Java, Java StackOverflowException handling, Reverse Polish Notation stack operations, RPN calculator GUI interface, Java Waterfall methodology project, Collaborative coding Java, Java StackCalculator project, University project with UML and Gantt
This project is licensed under the MIT License, a permissive open-source license that allows anyone to use, modify, and distribute the software freely โ as long as credit is given and the original license is included.
In plain terms: use it, build on it, just donโt blame us if something breaks.
โญ Like what you see? Consider giving the project a star!