// CMSC 341 - Fall 26 - Project 4 #include "dealer.h" CarDB::CarDB(int size, hash_fn hash, prob_t probing = DEFPOLCY){ } CarDB::~CarDB(){ } void CarDB::changeProbPolicy(prob_t policy){ } bool CarDB::insert(Car car){ } bool CarDB::remove(Car car){ } const Car CarDB::getCar(string model, int id) const{ } bool CarDB::updateDealer(Car car, int id){ } float CarDB::lambda() const { } float CarDB::deletedRatio() const { } void CarDB::dump() const { cout << "Dump for the current table: " << endl; if (m_currentTable != nullptr) for (int i = 0; i < m_currentCap; i++) { cout << "[" << i << "] : " << m_currentTable[i] << endl; } cout << "Dump for the old table: " << endl; if (m_oldTable != nullptr) for (int i = 0; i < m_oldCap; i++) { cout << "[" << i << "] : " << m_oldTable[i] << endl; } } bool CarDB::isPrime(int number){ bool result = true; for (int i = 2; i <= number / 2; ++i) { if (number % i == 0) { result = false; break; } } return result; } int CarDB::findNextPrime(int current){ //we always stay within the range [MINPRIME-MAXPRIME] //the smallest prime starts at MINPRIME if (current < MINPRIME) current = MINPRIME-1; for (int i=current; i sqrt(i) && i != current) { return i; } } } //if a user tries to go over MAXPRIME return MAXPRIME; }