Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Dictionary using hashing c++ program

26/03/2021 Client: saad24vbs Deadline: 3 days

/**
*
*
* @description Assignment 13 Dictionaries and Hash table
* implementations.
*/
#include < cassert >
#include < iostream >
#include "KeyValuePair.hpp"
#include "Employee.hpp"
#include "HashDictionary.hpp"

using namespace std ;

/** main
* The main entry point for this program. Execution of this program
* will begin with this main function.
*
* @param argc The command line argument count which is the number of
* command line arguments provided by user when they started
* the program.
* @param argv The command line arguments, an array of character
* arrays.
*
* @returns An int value indicating program exit status. Usually 0
* is returned to indicate normal exit and a non-zero value
* is returned to indicate an error condition.
*/
int main ( int argc , char ** argv )
{
// -----------------------------------------------------------------------
cout << "----- testing Employee record and KeyValuePair class -----------" << endl ;
KeyValuePair < int , string > pair ( 42 , "blue" );
cout << "test key: " << pair . key () << endl ;
assert ( pair . key () == 42 );
cout << "test value: " << pair . value () << endl ;
assert ( pair . value () == "blue" );

int id = 3 ;
Employee e ( id , "Derek Harter" , "1234 Main Street, Commerce TX" , 12345.67 );
cout << e << endl ;
assert ( e . getId () == 3 );
assert ( e . getName () == "Derek Harter" );
cout << endl ;


// -----------------------------------------------------------------------
cout << "-------------- testing quadratic probing -----------------------" << endl ;
const int TABLE_SIZE = 7 ;
HashDictionary < int , Employee > dict ( TABLE_SIZE , EMPTY_EMPLOYEE_ID );

cout << "Newly created hash dictionary should be empty, size: " << dict . size () << endl ;
assert ( dict . size () == 0 );

int probeIndex = 0 ;
//cout << "probe index: " << probeIndex
// << " returned probe value: " << dict.probe(id, probeIndex)
// << endl;
//assert(dict.probe(id, probeIndex) == 2);

probeIndex = 1 ;
//cout << "probe index: " << probeIndex
// << " returned probe value: " << dict.probe(id, probeIndex)
// << endl;
//assert(dict.probe(id, probeIndex) == 5);

probeIndex = 5 ;
//cout << "probe index: " << probeIndex
// << " returned probe value: " << dict.probe(id, probeIndex)
// << endl;
//assert(dict.probe(id, probeIndex) == 37);
cout << endl ;

// -----------------------------------------------------------------------
cout << "-------------- testing mid-square hashing ----------------------" << endl ;
// the following asserts will only work for 32 bit ints, leave asserts
// commented out if you have 64 bit asserts
cout << "Assuming 32 bit (4 byte) ints for these tests: " << sizeof ( int ) << endl ;
assert ( sizeof ( int ) == 4 );

//id = 3918;
//cout << "hash key: " << id
// << " returned hash value: " << dict.hash(id)
// << endl;
//assert(dict.hash(id) == 1);

//id = 48517;
//cout << "hash key: " << id
// << " returned hash value: " << dict.hash(id)
// << endl;
//assert(dict.hash(id) == 6);

//id = 913478;
//cout << "hash key: " << id
// << " returned hash value: " << dict.hash(id)
// << endl;
//assert(dict.hash(id) == 5);

//id = 8372915;
//cout << "hash key: " << id
// << " returned hash value: " << dict.hash(id)
// << endl;

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Instant Homework Helper
Assignments Hut
Homework Master
Homework Guru
Phd Writer
Peter O.
Writer Writer Name Offer Chat
Instant Homework Helper

ONLINE

Instant Homework Helper

I will cover all the points which you have mentioned in your project details.

$54 Chat With Writer
Assignments Hut

ONLINE

Assignments Hut

Give me a chance, i will do this with my best efforts

$51 Chat With Writer
Homework Master

ONLINE

Homework Master

Hello, I an ranked top 10 freelancers in academic and contents writing. I can write and updated your personal statement with great quality and free of plagiarism

$146 Chat With Writer
Homework Guru

ONLINE

Homework Guru

Hello, I an ranked top 10 freelancers in academic and contents writing. I can write and updated your personal statement with great quality and free of plagiarism

$74 Chat With Writer
Phd Writer

ONLINE

Phd Writer

I have read and understood all your initial requirements, and I am very professional in this task.

$32 Chat With Writer
Peter O.

ONLINE

Peter O.

I have read and understood all your initial requirements, and I am very professional in this task.

$51 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Forever 21 christian values - Ma1015 week 3 test answers - We came we saw we conquered - Joe larkin millennium partners - Discussion, APA 6, 2 References, Similarities Less 5% - Health Documentary - Synchronous motor circuit diagram - Assignment - Of the coffee makers sold in an appliance store - Growing up tethered essay - Must answer fully with no copy and paste. - What can you infer is mallam siles motivation - The recording process and the accounting equation - A job cost sheet contains - Partnership act 1892 - Time series analysis and its applications ppt - Infection control in dental radiology ppt - Business Finance Essay - Kurt russell net worth - The manufacturer of the vinegar used in this experiment - Pen portrait example students - Three input components of the congruence model - Idea accounting software - Unified soil classification system - Nola pender website - Adolescence : Contemporary Issues and Resources - College algebra pearson 11th edition - Critical thinking using Critical lenses essay Due Monday - Wsq competency framework - The rigid l shaped member abf is supported - Ajax case study solution - South cheshire private hospital - How do incumbents respond to the threat of entry - LEADERSHIP IN THE GLOBAL CONTEXT - Lifespan development john santrock 16th edition - Music the hope raiser paragraph - Week 6 - Marble launcher lab physics answers - Quiz 4 - Bunsen burner scientific diagram - ME-8 - Paper - Is strayer university any good - Need a Rewrite on case 2 Quality Control - Supply chain - Https www amazon com ref nav_logo_prime - Week6-Final essay - Prepare a balance sheet at december - What is a dividend divisor and quotient - Village of euclid v ambler realty co case brief - Significance and Application in Criminal Justice - Discuss the business environment of jessops - Clark rubber traralgon vic - Controversial or sensitive issue - Anth5 - Hius 221 quiz 2 - ASSIGNMENT - How to make an arctic habitat in a shoebox - Ftse4good bursa malaysia index - Cassowary coast regional council waste management - Westcotec speed indicator device - Shellcore command ep 2 infection - Case study - So long a letter characters - International Business - Dicussion - What is under armour's mission statement - Bones of the orbit - Lab charles law datasheet answers - Police and society - Example of postal ksas - Swot analysis of netflix 2018 - Three stanza poem - Fast food documentary mcdonalds - Health Insurance Project - Ipv6 implementation in india - Study habits - Usmle step 3 preparation tips - Hunches that communication theory are built about should be - Blank swms template free - Are dollar shave club handles interchangeable - Mha 516 4 - Avon community employment support centre - Race - Bugsy malone character breakdown - Workshop supervisor duties and responsibilities - Financial Report - Church bell ringer crossword - Discussion question - Apple case study harvard business school - Meditation 17 literary devices - Grit and growth mindset university of phoenix - Cloud programming and software environments ppt - Euroa clothing company australia - Madison harris the owner invested t account - Business Ethics : D4 :How would you describe that factors that determine the tone at the top - Discussion board - Msl medical abbreviation pregnancy - Multiple choice questions on value education - Leveling wedges crossword clue