https://github.com/n-elmer/scientific-calculator
CALCULATOR WITH ๐งช๐งฎ SCIENTIFIC FUNCTIONS
https://github.com/n-elmer/scientific-calculator
c-plus-plus software-design software-engineering
Last synced: 3 months ago
JSON representation
CALCULATOR WITH ๐งช๐งฎ SCIENTIFIC FUNCTIONS
- Host: GitHub
- URL: https://github.com/n-elmer/scientific-calculator
- Owner: N-Elmer
- License: gpl-3.0
- Created: 2023-06-06T10:53:32.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-06T14:39:50.000Z (8 months ago)
- Last Synced: 2025-04-14T18:08:09.221Z (3 months ago)
- Topics: c-plus-plus, software-design, software-engineering
- Language: C++
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SCIENTIFIC-CALCULATOR
CALCULATOR WITH ๐งช๐งฎ SCIENTIFIC FUNCTIONS## Folder Structure
```
๐ scientific-calculator
|
โโโ ๐ README.md
โโโ src
โโโ ๐ main.cppโโโ ๐ Calculator.h
โโโ ๐ Calculator.cpp
โโโ ๐ .gitignore
The project folder structure consists of the following files:- ๐ README.md: This file contains the documentation and information about the scientific calculator project, including how to use it and any additional details.
- ๐ main.cpp: This file is the entry point of the program, where an instance of the `Calculator` class is created and its `run()` function is called.
- ๐ Calculator.h: This file contains the declaration of the `Calculator` class and its member functions.
- ๐ Calculator.cpp: This file contains the definition of the `Calculator` class member functions.
```## Usage
To use the scientific calculator, follow these steps:
1. Clone or download this project repository.
2. Compile the source code files `main.cpp` and `Calculator.cpp` using a C++ compiler.
3. Run the compiled executable.
4. Enter the operation you want to perform:
- `+` for addition
- `-` for subtraction
- `*` for multiplication
- `/` for division
- `s` for square root
- `p` for exponentiation5. Follow the prompts to enter the required numbers or values for the selected operation.
6. The calculator will display the result of the operation.
7. Repeat the process to perform additional calculations.
## Code Explanation
The scientific calculator is implemented using a class called `Calculator`. The class encapsulates the calculator functionality, including the different arithmetic operations and other mathematical functions.
The `Calculator` class has member functions for each operation, such as `performAddition()`, `performSubtraction()`, `performMultiplication()`, `performDivision()`, `performSquareRoot()`, and `performExponentiation()`. These functions handle user input and perform the corresponding calculations.
The `run()` function serves as the entry point for the calculator. It prompts the user for the desired operation and calls the appropriate member function based on the input.
The main program in `main.cpp` creates an instance of the `Calculator` class and invokes its `run()` function to start the calculator.
## Troubleshooting
If you encounter any issues or errors while using the scientific calculator, consider the following:
- Double-check that the source code files `main.cpp`, `Calculator.h`, and `Calculator.cpp` are present and correctly placed in the same directory.
- Ensure that you have a C++ compiler installed on your system and that it supports the C++ version used in the project.
- Verify that you are entering valid inputs for the calculator operations and following the prompts correctly.
If the problem persists, feel free to open an issue in the GitHub repository for further assistance.
---
This README file provides an overview of the scientific calculator project, its folder structure, usage instructions, code explanation, and troubleshooting tips. Use it as a guide to understand and utilize the scientific calculator.