jairovelasquez/java-smart-import
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Java Calculator Demo
====================
A minimal Java project for demonstrating a GitHub repository setup.
Files
-----
- Calculator.java : A simple calculator class with add, subtract, multiply,
and divide operations (includes divide-by-zero handling).
- Main.java : Entry point that demonstrates using the Calculator class.
How to Run
----------
1. Compile the files:
javac Main.java Calculator.java
2. Run the program:
java Main
Expected Output
---------------
Calculator Demo
a = 12.0, b = 4.0
a + b = 16.0
a - b = 8.0
a * b = 48.0
a / b = 3.0
Error caught: Cannot divide by zero
License
-------
This project is provided as-is for demonstration purposes.