#ifndef SEARCH_MANAGER_H #define SEARCH_MANAGER_H #include "HashTable.h" #include "CPU.h" template class SearchManager { private: HashTable hashTable; public: SearchManager(HashTable &ht); void searchCPU() const; }; template SearchManager::SearchManager(HashTable &ht) { this->hashTable = ht; } template void SearchManager::searchCPU() const { std::string cpuID; std::cout << "Enter the CPU ID to search: "; std::cin >> cpuID; // Search for the CPU in the HashTable CPU *foundCPU = hashTable.search(cpuID); if (foundCPU != nullptr) { std::cout << "CPU found:" << std::endl; std::cout << *foundCPU << std::endl; } else { std::cout << "CPU not found." << std::endl; } } #endif