- 📖 Overview
- 🆕 What's New in V5.0
- ⚡ Features
- 🏗️ Architecture
- 🚀 Quick Start
- 💻 Installation
- 📚 Usage Guide
- 🧪 Examples
- 📈 Version History
- 🤝 Contributing
- 📝 License
- 📧 Contact
Smart Calculator V5.0 is a comprehensive, modular C++ educational suite that provides advanced mathematical computations with professional code architecture. This version introduces optimized exit handling, enhanced modular design, and refined user experience, making it an excellent resource for learning modern C++ programming paradigms and professional software development practices.
- Demonstrate advanced C++ programming with modular architecture
- Showcase professional UI/UX design in console applications
- Provide comprehensive mathematical operations for academic learning
- Illustrate best practices in code organization and documentation
- ✨ Modular Exit System: Dedicated
exit_program()function for clean code organization - 🎯 Enhanced Code Reusability: DRY (Don't Repeat Yourself) principle implementation
- 📋 Optimized Function Management: Streamlined exit handling across different scenarios
- 🎨 Professional Design Patterns: KISS (Keep It Simple, Stupid) methodology
- 🔍 Function Separation: Clean separation of exit logic from main application flow
- 📊 Code Maintainability: Improved code structure for easier maintenance and updates
- 🧮 Professional Standards: Industry-standard programming practices implementation
- 📦 Consistent Exit Behavior: Unified exit experience across all program paths
- 🔧 Streamlined Interface: Simplified user interaction with maintained functionality
- 📚 Educational Value: Demonstrates advanced C++ modular programming concepts
| Operation | Description | Features | Examples |
|---|---|---|---|
| Basic Arithmetic | Addition, Subtraction, Multiplication, Division | Dynamic vector input, operation history | 5 + 3 * 2 = 11 |
| Exponentiation | Power calculations with custom bases | Integer bases, flexible exponents | 2^8 = 256 |
| Number Analysis | Even/Odd classification | Bulk processing, numbered input | [2,4,6] → Even, [1,3,5] → Odd |
| Statistical Functions | Average calculation | Multiple number support, precision | (2+4+6+8)/4 = 5.0 |
| Factorial Computation | Mathematical factorial | Large number handling | 5! = 120 |
| Prime Number Testing | Primality analysis | Single or range testing | 7 → Prime, 8 → Not Prime |
- Triangle Area Calculation
- Basic Formula:
Area = (base × height) / 2 - Heron's Formula:
Area = √(s(s-a)(s-b)(s-c))wheres = (a+b+c)/2
- Basic Formula:
- Triangle Perimeter:
Perimeter = side₁ + side₂ + side₃ - Multiple Methods: Choose between different calculation approaches
- Length Conversions:
- cm ⟷ m ⟷ km (bidirectional)
- Precise conversion factors and calculations
- Area Conversions:
- cm² ⟷ m² ⟷ km² (comprehensive matrix)
- Multi-step conversion support with accuracy
- Welcome System: Professional startup with program introduction
- Menu Navigation: Intuitive numbered options with descriptions
- Input Validation: Error handling and user guidance
- Continuous Operation: Loop-based design for multiple calculations
- Clean Interface: Organized output with clear formatting
Smart-Calculator-V5.0/
│
├── 📄 main.cpp # Enhanced UI & application logic
├── 📄 operations.h # Comprehensive function declarations
├── 📄 operations.cpp # Mathematical implementations (legacy)
├── 📄 LICENSE # Educational use license
├── 📄 README.md # Project documentation
└── 📁 .git/ # Version control
| Component | Technology | Version | Purpose |
|---|---|---|---|
| Language | C++ | 17+ | Core implementation |
| UI System | Console-based | Custom | Professional interface |
| Data Structures | STL Vectors | Dynamic | Flexible input handling |
| Menu System | Modular Functions | Custom | Organized navigation |
| Compiler Support | GCC/Clang/MSVC | 7.0+/6.0+/2017+ | Cross-platform |
- Modular Architecture: Separated UI and logic components
- Function Overloading: Multiple menu display methods
- Vector-Based Input: Dynamic memory management
- Professional UI Design: Consistent formatting and layout
- C++ Compiler: GCC 7.0+, Clang 6.0+, or MSVC 2017+
- Command Line Interface: Terminal, Command Prompt, or PowerShell
- System Requirements: Windows/Linux/macOS
# 1. Clone the repository
git clone https://github.com/Amr4924/Simple-Cpp-Operations-Project.git
# 2. Navigate to project directory
cd Simple-Cpp-Operations-Project
# 3. Compile with C++17 standard
g++ -std=c++17 -o calculator main.cpp
# 4. Run the calculator
./calculator # Linux/macOS
calculator.exe # Windows# Debug build with full warnings
g++ -g -Wall -Wextra -Wpedantic -std=c++17 -o calculator_debug main.cpp
# Optimized release build
g++ -O3 -DNDEBUG -std=c++17 -o calculator_release main.cpp
# Windows with MinGW
g++ -std=c++17 -static -o calculator.exe main.cpp# Using MinGW-w64
g++ -std=c++17 -o calculator.exe main.cpp
# Using Microsoft Visual Studio
cl /EHsc /std:c++17 main.cpp /Fe:calculator.exe# Install build tools
sudo apt update && sudo apt install build-essential
# Compile
g++ -std=c++17 -o calculator main.cpp# Install Xcode Command Line Tools
xcode-select --install
# Compile with Clang
clang++ -std=c++17 -o calculator main.cpp- Welcome Screen: Choose to start (
[1]) or exit ([0]) - Main Menu: Select from 8 mathematical operations
- Operation Selection: Each operation provides:
- Detailed description with mathematical explanation
- Practical examples
- Step-by-step input guidance
- Result Display: Clear, formatted output
- Continue Options: Choose to perform another calculation or exit
| Operation | Menu Option | Description |
|---|---|---|
| Basic Arithmetic | [1] |
Dynamic arithmetic with multiple operations |
| Exponentiation | [2] |
Power calculations with base and exponent |
| Even/Odd Analysis | [3] |
Bulk number classification |
| Average Calculation | [4] |
Statistical mean of multiple numbers |
| Factorial | [5] |
Mathematical factorial computation |
| Triangle Geometry | [6] |
Area and perimeter calculations |
| Unit Conversion | [7] |
Length and area unit transformations |
| Prime Numbers | [8] |
Primality testing and analysis |
Operation: Basic Arithmetic
Input: Dynamic number and operator entry
Process: Vector-based calculation with operation history
Output: Final computed result
Input: Three sides (a=3, b=4, c=5)
Process:
s = (3+4+5)/2 = 6
Area = √[6(6-3)(6-4)(6-5)] = √[6×3×2×1] = 6
Output: Area = 6.00 square units
Single Number Test:
Input: 17
Output: ✅ 17 is a PRIME number!
Range Analysis:
Input: Range [10-20]
Output:
✅ PRIME: 11, 13, 17, 19 (4 primes)
❌ NON-PRIME: 10, 12, 14, 15, 16, 18, 20 (7 non-primes)
Length Conversion:
Input: 1500 cm → m
Process: 1500 ÷ 100 = 15
Output: 15.00 meters
Area Conversion:
Input: 5 m² → cm²
Process: 5 × 10,000 = 50,000
Output: 50,000.00 cm²
| Version | Release Date | Key Features | Status |
|---|---|---|---|
| V5.0 | September 2025 | Professional Code Architecture, Modular Exit System | ✅ Current |
| V4.5 | August 2025 | Enhanced UI, Prime Numbers, Professional Menus | 📦 Archived |
| V3.5 | Previous | Modular architecture, header organization | 📦 Archived |
| V3.0 | Previous | Triangle geometry, unit conversion systems | 📦 Archived |
| V2.0 | Previous | Enhanced arithmetic, operation history | 📦 Archived |
| V1.0 | Initial | Basic calculator functionality | 📦 Archived |
- ✅ Modular Exit System: Dedicated
exit_program()function for clean architecture - ✅ Professional Code Design: Implementation of DRY and KISS principles
- ✅ Enhanced Maintainability: Improved code structure and organization
- ✅ Optimized Function Management: Streamlined exit handling across scenarios
- ✅ Industry Standards: Professional programming practices demonstration
- ✅ Code Reusability: Elimination of code duplication with modular functions
- Modular Menu System: Separated UI components (
Welcome,SubMenu,MenuConvert) - Professional Documentation: Comprehensive function comments with examples
- STL Integration: Modern C++ with vector containers and algorithms
- Error Handling: Input validation and user guidance systems
- Consistent Formatting: Professional borders and organized layout
- Interactive Navigation: Numbered options with clear descriptions
- Educational Content: Operation explanations with mathematical examples
- Visual Feedback: Organized output with formatted results
- Efficient Algorithms: Optimized mathematical computations
- Dynamic Memory Management: Vector-based data structures
- Cross-Platform Compatibility: Support for major operating systems
- Modular Design: Clean separation of concerns for maintainability
We welcome educational contributions! Here's how to get involved:
- 🍴 Fork the repository
- 🌿 Create a feature branch (
git checkout -b feature/educational-enhancement) - 💾 Commit changes (
git commit -m 'Add educational feature') - 🚀 Push to branch (
git push origin feature/educational-enhancement) - 📬 Open a Pull Request
- Follow C++17 standards and modern practices
- Use consistent naming conventions and code formatting
- Include comprehensive comments for educational value
- Maintain modular architecture for menu and calculation functions
- Test across multiple platforms (Windows/Linux/macOS)
- Verify compilation with different compilers
- Ensure no regression in existing functionality
- Validate user interface consistency and usability
- Update README.md for new features
- Include operation descriptions with mathematical explanations
- Provide usage examples and educational context
- Maintain architectural documentation for future developers
This project is licensed under the MIT License - Educational Use Only.
| Usage Type | Permission | Description |
|---|---|---|
| 🎓 Educational | ✅ Allowed | Learning, academic projects, skill development |
| 🏫 Academic | ✅ Allowed | University assignments, research projects |
| 👨💻 Personal Learning | ✅ Allowed | Individual skill building, portfolio development |
| 🌐 Open Source | ✅ Allowed | Contributing to educational repositories |
| 💼 Commercial | ❌ Prohibited | Selling, profit generation, commercial use |
| 🏭 Enterprise | ❌ Prohibited | Corporate use without explicit permission |
For full license terms and conditions, see the LICENSE file.
Commercial Licensing: For commercial use inquiries, contact through LinkedIn.
Amr Sa3dwy - Lead Developer & Educational Architect
| Platform | Profile | Purpose |
|---|---|---|
| 💻 GitHub | @Amr4924 | Source code & project repositories |
| Amr Sa3dwy | Professional networking & collaboration | |
| 🎥 TikTok | @3mr675 | Programming tutorials & educational content |
Feel free to contact for:
- ❓ Questions about implementation or usage
- 💡 Suggestions for educational improvements
- 🤝 Collaboration on educational projects
- 🎓 Academic discussions and learning opportunities
- 🐛 Bug reports or technical issues
- C++ Programming Community: For modern programming standards and best practices
- Educational Open Source Contributors: Supporting knowledge sharing and collaborative learning
- Mathematical Computing Enthusiasts: For algorithmic inspiration and computational methods
- UI/UX Design Principles: For professional interface design in console applications
This project demonstrates:
- Modern C++ Development: Industry-standard practices with modular architecture and clean code principles
- Professional Software Engineering: Implementation of DRY, KISS, and modular design patterns
- Educational Software Design: User-friendly interfaces optimized for learning environments
- Mathematical Computing: Practical application of algorithms with professional code organization
- Code Maintainability: Advanced techniques for sustainable and scalable software development