A comprehensive C++ application that simulates a cryptocurrency management platform with enterprise-grade features, demonstrating advanced OOP concepts and real-world blockchain functionality.
Coinqueror is a sophisticated cryptocurrency simulation platform that combines the functionality of major exchanges like Binance with enhanced features for portfolio management, blockchain tracking, and real-time auditing. Built with modern C++ principles, it showcases advanced object-oriented programming concepts while providing a robust digital asset ecosystem.
- Hierarchical Architecture: Sophisticated class hierarchy (
DigitalAssetโToken/MarketEntityโCryptoCurrency/UtilityCoin/StableCoin) - Polymorphic Behavior: Dynamic method dispatch via virtual functions (
displayInfo(),calculateMarketValue()) - Diamond Inheritance Resolution: Clean implementation of multiple inheritance patterns
- Dynamic Portfolio Management: Expandable wallet system with automatic resizing
- Transaction Validation: Secure crypto transfers with comprehensive validation
- Blockchain Tracking: Immutable transaction history between wallets
- Templated Logging: Generic
AuditLog<T>supports multiple data types - Timestamp Tracking: Automated action logging with precise timestamps
- Custom Formatters: Human-readable log output with configurable formats
- File I/O Operations: Seamless load/save functionality for all data types
- Dynamic Memory Management: Efficient allocation and resizing for scalability
- Multiple Data Sources: Support for
cryptos.txt,wallets.txt,transactions.txt
- Singleton Menu System: Clean CLI interface with 24+ operations
- CRUD Operations: Complete Create, Read, Update, Delete functionality
- Comparison Tools: Advanced asset comparison and analysis features
DigitalAsset (Abstract Base)
โโโ Token (Symbol Management)
โโโ MarketEntity (Market Cap Tracking)
โโโ CryptoCurrency (Diamond Inheritance)
โโโ UtilityCoin (Specialized Use Cases)
โโโ StableCoin (Asset-Backed Stability)| Component | Description | Key Features |
|---|---|---|
| DigitalAsset | Abstract base class for all crypto assets | Pure virtual methods, polymorphic interface |
| CryptoCurrency | Main crypto implementation | Diamond inheritance resolution, market integration |
| Wallet | Portfolio management system | Dynamic expansion, owner metadata |
| Blockchain | Transaction ledger | Immutable history, validation system |
| AuditLog<T> | Templated logging system | Type-safe logging, file persistence |
- C++17 compatible compiler (GCC 7.0+, Clang 5.0+, MSVC 2017+)
- Standard C++ library
# Clone the repository
git clone https://github.com/yourusername/coinqueror.git
cd coinqueror
# Compile with C++17 support
g++ -std=c++17 project.cpp -o coinqueror
# Run the application
./coinquerorPlace these files in your working directory to preload sample data:
cryptos.txt # Sample cryptocurrency definitions
wallets.txt # Pre-configured wallet data
transactions.txt # Historical transaction records
- โ Multiple Inheritance with diamond problem resolution
- โ Virtual Functions and pure virtual methods
- โ Polymorphism through base class pointers
- โ Encapsulation with proper access control
- โ
Operator Overloading (
+,-,++,[], etc.) - โ Template Programming with generic classes
- โ Exception Handling with custom exception types
- โ RAII Principles for resource management
- โ Smart Pointers for memory safety
- โ Singleton Pattern for menu management
- โ Factory Pattern for object creation
- โ Observer Pattern for audit logging
// Polymorphic asset creation
auto bitcoin = std::make_unique<CryptoCurrency>("Bitcoin", 45000.0, "BTC", 850000000000);
auto ethereum = std::make_unique<UtilityCoin>("Ethereum", 3200.0, "ETH", "Smart Contracts");
// Operator overloading in action
CryptoCurrency combined = *bitcoin + *ethereum; // Combines market values
++wallet; // Increases wallet capacityWallet userWallet("Alice", 10);
userWallet.addCryptocurrency(std::move(bitcoin));
userWallet.displayPortfolio(); // Polymorphic displayTransaction tx(wallet1, wallet2, bitcoin.get(), 0.5);
blockchain.addTransaction(tx); // Validated and recordedcoinqueror/
โโโ project.cpp # Main implementation file
โโโ cryptos.txt # Sample cryptocurrency data
โโโ wallets.txt # Sample wallet configurations
โโโ transactions.txt # Sample transaction history
โโโ audit_general.log # Generated audit log
โโโ audit_stats.log # Statistical audit data
โโโ README.md # This file
Unified interface handling diverse asset types through base class pointers:
std::vector<std::unique_ptr<DigitalAsset>> assets;
// All assets can be managed uniformly despite different implementationsCryptoCurrency cleanly inherits from both Token and MarketEntity:
class CryptoCurrency : public Token, public MarketEntity {
// Resolves potential ambiguity through virtual inheritance
};Generic audit logging supports multiple data types:
AuditLog<std::string> actionLog; // For general actions
AuditLog<int> statsLog; // For numerical statisticsComprehensive error handling throughout the application:
try {
wallet.addCryptocurrency(invalidCrypto);
} catch (const std::invalid_argument& e) {
std::cerr << "Validation failed: " << e.what() << std::endl;
}The application provides 24+ interactive options including:
- ๐ง CRUD Operations: Create, modify, and delete assets
- ๐ Market Analysis: Compare cryptocurrencies and market trends
- ๐ผ Portfolio Management: Manage multiple wallets and holdings
- ๐ Transaction History: View and analyze blockchain transactions
- ๐ Audit Reports: Generate comprehensive system logs
- Zero Memory Leaks: Proper RAII and smart pointer usage
- Exception Safe: Comprehensive error handling throughout
- Scalable Design: Dynamic memory management and resizing
- Type Safety: Template-based generic programming
- Clean Architecture: SOLID principles implementation
Built with โค๏ธ and modern C++