Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 

Repository files navigation

OOP Calculator (Java)

A simple calculator built using Object-Oriented Programming principles in Java.

Features

  • Supports addition, subtraction, multiplication, and division
  • Uses OOP structure (classes, methods, and exception handling)
  • Command-line interface

πŸ“‚ Project Structure

oop-calculator/
 β”œβ”€β”€ src/
 β”‚   β”œβ”€β”€ Calculator.java
 β”‚   β”œβ”€β”€ Operation.java
 β”‚   └── Main.java
 └── README.md

▢️ How to Run

  1. Open terminal and navigate to src folder.
  2. Compile:
    javac Main.java
  3. Run:
    java Main

Example

Enter first number: 12
Enter operator (+, -, *, /): *
Enter second number: 5
Result: 60.0

About

A simple Object-Oriented Programming (OOP) calculator built in Java. My first Java test project exploring classes, objects, and methods.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages