Question: please help with all FixMe lines in the code. in C + + * * * #include #include #include #include / / atoi #include #include

please help with all FixMe lines in the code. in C++***
#include
#include
#include
#include // atoi
#include
#include "CSVparser.hpp"
using namespace std;
//============================================================================
// Global definitions visible to all methods and classes
//============================================================================
const unsigned int DEFAULT_SIZE =179;
// forward declarations
double strToDouble(string str, char ch);
// define a structure to hold bid information
struct Bid {
string bidId; // unique identifier
string title;
string fund;
double amount;
Bid(){
amount =0.0;
}
};
//============================================================================
// Hash Table class definition
//============================================================================
/**
* Define a class containing data members and methods to
* implement a hash table with chaining.
*/
class HashTable {
private:
// Define structures to hold bids
struct Node {
Bid bid;
unsigned int key;
Node *next;
// default constructor
Node(){
key = UINT_MAX;
next = nullptr;
}
// initialize with a bid
Node(Bid aBid) : Node(){
bid = aBid;
}
// initialize with a bid and a key
Node(Bid aBid, unsigned int aKey) : Node(aBid){
key = aKey;
}
};
vector nodes;
unsigned int tableSize = DEFAULT_SIZE;
unsigned int hash(int key);
public:
HashTable();
HashTable(unsigned int size);
virtual ~HashTable();
void Insert(Bid bid);
void PrintAll();
void Remove(string bidId);
Bid Search(string bidId);
size_t Size();
};
/**
* Default constructor
*/
HashTable::HashTable(){
// FIXME (1): Initialize the structures used to hold bids
// Initalize node structure by resizing tableSize
}
/**
* Constructor for specifying size of the table
* Use to improve efficiency of hashing algorithm
* by reducing collisions without wasting memory.
*/
HashTable::HashTable(unsigned int size){
// invoke local tableSize to size with this->
// resize nodes size
}
/**
* Destructor
*/
HashTable::~HashTable(){
// FIXME (2): Implement logic to free storage when class is destroyed
// erase nodes beginning
}
/**
* Calculate the hash value of a given key.
* Note that key is specifically defined as
* unsigned int to prevent undefined results
* of a negative list index.
*
* @param key The key to hash
* @return The calculated hash
*/
unsigned int HashTable::hash(int key){
// FIXME (3): Implement logic to calculate a hash value
// return key tableSize
}
/**
* Insert a bid
*
* @param bid The bid to insert
*/
void HashTable::Insert(Bid bid){
// FIXME (4): Implement logic to insert a bid
// create the key for the given bid
// retrieve node using key
// if no entry found for the key
// assign this node to the key position
// else if node is not used
// assing old node key to UNIT_MAX, set to key, set old node to bid and old node next to null pointer
// else find the next open node
// add new newNode to end
}
/**
* Print all bids
*/
void HashTable::PrintAll(){
// FIXME (5): Implement logic to print all bids
// for node begin to end iterate
// if key not equal to UINT_MAx
// output key, bidID, title, amount and fund
// node is equal to next iter
// while node not equal to nullptr
// output key, bidID, title, amount and fund
// node is equal to next node
}
/**
* Remove a bid
*
* @param bidId The bid id to search for
*/
void HashTable::Remove(string bidId){
// FIXME (6): Implement logic to remove a bid
// set key equal to hash atoi bidID cstring
// erase node begin and key
}
/**
* Search for the specified bidId
*
* @param bidId The bid id to search for
*/
Bid HashTable::Search(string bidId){
Bid bid;
// FIXME (7): Implement logic to search for and return a bid
// create the key for the given bid
// if entry found for the key
//return node bid
// if no entry found for the key
// return bid
// while node not equal to nullptr
// if the current node matches, return it
//node is equal to next node
return bid;
}
//============================================================================
// Static methods used for testing
//============================================================================
/**
* Display the bid information to the console (std::out)
*
* @param b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!