A professional-grade scientific calculator showcasing modern C++ development practices
View Features
·
Quick Start
·
Documentation
·
Roadmap
- Overview
- Features
- Tech Stack
- Getting Started
- Usage Examples
- Architecture
- Testing
- Contributing
- License
- Contact
This advanced scientific calculator is a showcase of professional C++ development practices, designed to demonstrate expertise in:
- Modern C++ (14/17) features and best practices
- Object-Oriented Design principles
- Test-Driven Development (TDD)
- Clean Code architecture
- Professional documentation
- Continuous Integration/Deployment
Perfect for both learning purposes and real-world applications, this project serves as a portfolio piece demonstrating professional software engineering capabilities.
- Basic arithmetic (addition, subtraction, multiplication, division)
- Scientific functions (square root, power, natural logarithm)
- Trigonometric functions (sine, cosine, tangent)
- Support for both radians and degrees
- Store and recall values (MS, MR)
- Memory addition and subtraction (M+, M-)
- Memory clear function (MC)
- Calculation history tracking
- Error handling and input validation
- Floating-point precision control
- Professional number formatting
- Expression parsing
- Real-time calculation display
- Exception-safe operations
- RAII principles
- Modern C++ practices
- Comprehensive unit testing
- Detailed documentation
- Language: C++14/17
- Build System: CMake 3.10+
- Testing Framework: Google Test
- Documentation: Doxygen
- CI/CD: GitHub Actions
- Code Coverage: gcov/lcov
- Static Analysis: clang-tidy
- Code Formatting: clang-format
# Required packages
sudo apt-get update && sudo apt-get install -y \
build-essential \
cmake \
libgtest-dev \
doxygen \
graphviz \
clang-tidy \
clang-format
# Clone the repository
git clone https://github.com/yourusername/calculator.git
cd calculator
# Create build directory
mkdir build && cd build
# Configure and build
cmake ..
make
# Run tests (optional)
make test
# Generate documentation (optional)
make docs
// Basic arithmetic
calculator.add(5, 3); // Returns 8
calculator.multiply(4, 2); // Returns 8
// Scientific operations
calculator.sqrt(16); // Returns 4
calculator.power(2, 3); // Returns 8
calculator.sin(M_PI/2); // Returns 1
// Memory operations
calculator.memoryStore(5);
calculator.memoryAdd(3); // Memory now contains 8
calculator.memoryRecall(); // Returns 8
The project follows clean architecture principles:
calculator/
├── src/ # Source files
├── include/ # Header files
├── tests/ # Unit tests
├── docs/ # Documentation
├── examples/ # Usage examples
└── scripts/ # Build scripts
Comprehensive testing suite including:
- Unit tests for all operations
- Edge case testing
- Memory leak detection
- Performance benchmarks
- Integration tests
# Run all tests
./build/calculator_test
# Run specific test suite
./build/calculator_test --gtest_filter="CalculatorTest.*"
Future enhancements planned:
- Complex number support
- Unit conversion capabilities
- Graphing functionality
- Expression parser
- Custom function definitions
- Plugin system
- GUI interface
Contributions are welcome! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name - your.email@example.com
LinkedIn: Your LinkedIn Profile GitHub: Your GitHub Profile Portfolio: Your Portfolio Website
Star ⭐ this repository if you find it helpful!