Welcome to the Scientific Calculator, a beginner-to-intermediate level Java console application that performs both basic and advanced scientific mathematical operations. Designed to help students and enthusiasts explore Java programming and object-oriented principles.
This calculator supports the following functionalities:
- Addition
- Subtraction
- Multiplication
- Division
- Square Root (โ)
- Power (x^y)
- Sine (sin)
- Cosine (cos)
- Tangent (tan)
- Logarithm base 10 (log)
- Natural Logarithm (ln)
- Factorial (!)
- Exponential (e^x)
- Absolute Value (|x|)
- Language: Java
- Platform: Console-based (Command Line Interface)
- Package:
Scientific_Calculator
- Java Concepts Used:
- Classes and Objects
- Methods and Loops
- Switch Case
- Scanner Class (User Input)
- Exception Handling for invalid input
Scientific_Calculator/
โโโ ScientificCalculator.java
โโโ README.md
ScientificCalculator.java
โ Contains the full source code of the calculator.README.md
โ Project documentation.
- JDK 8 or higher installed
- A code editor (like IntelliJ IDEA, Eclipse, or VS Code) or just the terminal
-
Clone the Repository:
git clone https://github.com/your-username/Scientific_Calculator.git cd Scientific_Calculator
-
Compile the Java File:
javac ScientificCalculator.java
-
Run the Application:
java ScientificCalculator
----------------------------------------------------------------
Scientific Calculator
----------------------------------------------------------------
Please select an operation:
----------------------------------------------------------------
1. Addition (+)
2. Subtraction (-)
...
15. Exit
----------------------------------------------------------------
Enter your choice (1-15): 1
Enter first number: 12.5
Enter second number: 7.5
12.500000 + 7.500000 = 20.000000
Do you want to perform another operation? (Y/N): N