Question: Please make sure I need table.t File also you will have to create tableSpecificOps 1 . cpp and table.cpp as well. Please I need Full

Please make sure I need table.t File also you will have to create tableSpecificOps1.cpp and table.cpp as well. Please I need Full program code which shown as work perfectly . Use the given code and use your edit code run it successfully and send to me all code that you use on your program. Thank you so much Question:Design a table ADT Specifically write a table class.
It must be generic ( i.e. templated ) and contain all the necessary attributes and actions ( data members and member functions ) for the table class to behave as expected. you must write a table.t file that works for the provided files:
tableSpecificOps1.h, table.h pair.h pair.cpp driver.cpp.( you will have to create tableSpecificOps1.cpp and table.cpp as well) this is "tableSpecificOps1.h" #include "table.h"
#ifndef TABLE_SPCIFIC1_H
#define TABLE_SPCIFIC1_H
int f( char c);
int f1( double d); #endif NEXT This is "table.h" you may have add base code on this file : #ifndef TABLE_H
#define TABLE_H
#include
#include "pair.h"// Pair class
// implements a tabke containing key/value pairs.
// a table does not contain multiple copies of the same item.
// types T and Key must have a default constructor
template class Key, typename T >
class Table
{
public:
typedef Key key_type;
// for convenience
private:
// table implemented using a one dimensional array of key-value pairs
int tableSize;
Pair key_type, T >*the_table;
int (*Mapping)( Key k);
// Mapping is a function which maps keys to
// an array index; ie a key to address mapping
// the idea is that Mapping will act on a given key
// in such a way as to return the relative postion
// in the sequence at which we expect to find the key
// Mapping will be used in the remove, add, lookup. =
// member functions and copy constructor
public:
// for debugging
void print();
Table( int n, int (*map)( Key k));
// map is a function to map key to address
// in the implementation
// set the function ie have the code line
// Mapping = map;
// populates table with default values
// for the class Key and T
bool insert( Pair Key, T > kvpair );
// return true if item could be added to the
// table false if item was not added.
bool remove( const Key aKey );
// erase the key/value pair with the specified key
// from the table and return if successful
// removed item is replaced with default
// values for Key and T
T lookUp (const Key aKey) ;
// what if key not in table??
//need copy constructor
Table( const Table Key, T > &initTable );
//need destructor
~Table();
//need assignment operator
Table Key, T >&operator=(const Table Key, T > &initTable );
};
#include "table.t"
#endif NEXT this is another header file given named as "pair.h" #ifndef PAIR_H
#define PAIR_H
// more or less from STL library
// found in and
template class T1, class T2>
class Pair
{
public:
T1 first;
T2 second;
// default constructor
Pair(): first( T1()), second( T2())
{}
// constructor that initializes first and second
Pair( const T1 v1, const T2 v2):
first(v1), second(v2)
{}
//copy constructor
template typename U1, typename U2>
Pair ( const Pair& X)
: first( X.first ), second( X.second )
{}
// overload =
template typename U1, typename U2>
Pair& operator=( const Pair& init )
{
return *this = Pair(init);
}
// overload
friend bool operator( const Pair& lhs, const Pair& rhs )
{
return lhs.first rhs.first ||!( rhs.first lhs.first && lhs.second rhs.second );
}
// overload ==
friend bool operator==( const Pair& lhs, const Pair& rhs )
{
return lhs.first == rhs.first && lhs.second == rhs.second ;
}
};
template class T1, class T2>
Pair makePair( const T1& v1, const T2& v2)
{
return Pair T1, T2>(v1,v2);
}
#endif Finaly The "Driver.cpp" screenshot bellow ww
 Please make sure I need table.t File also you will have

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 Databases Questions!