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

Critical analysis - Cious root word meaning - Nurs 6512 head to toe assessment - Northern midlands council rubbish collection - Wrong - Navalwarcollege blackboard - Applicant self service cambridge - Families of elements worksheet answer key - Smart Technology - Persuasive claim pricey hotel breakfast - Global environment for network innovations - Joanne duffy theory - Geopolitical community and phenomenological community - Project on demand in economics - Fairness and equality in the classroom - Brady's distinctive lighting austin tx - Finance - Managing skills - The secret life of bees annotations - OB9 - Perl script to parse xml file - Mercy federal credit union candler hospital - Need help - COLLABORATIVE LEARNING COMMUNITY - Nurs495assignweek7 - Camp skits for counselors - Henry moore clinic castleford - Amerlock 400 color chart - Rmit special consideration extension - CYBER POLICY AND GOALS/INTRO TO CYBERSECURITY AND TECHNOLOGY - Turtle graphics igcse ict - Last one picked whoop dee doo lyrics - Aflac mission and vision statement - Tempco electric heater corp - 18 eugene street tarneit - Ballarat base hospital outpatients - Stirling 4.1 kw portable air conditioner - Respond to the discussion board - Is a dcp an environmental planning instrument - Pleasantville discussion questions and answers - Salem press encyclopedia january 2016 - Video game pitch presentation - Genesis 11 1-9 nlt - MF week 5 - Organisation and management theory - What is unfired pressure vessel - 200 ways to pass the chemistry regents - Convert the following temperatures from k to c - Working credit balance centrelink - Week 6 - Social work case study examples - NURSING: EVIDENCED-BASED PRACTICE PROJECT - Deep vein thrombosis powerpoint presentation - Brunswick west tennis club - Product life cycle of domino's pizza - Synapse vs neuromuscular junction - Liberty university busi 201 - Transition to Graduate Study - Smart phones should be allowed in school - Train ballymena to belfast - Healthcare Ethics - Volvo fh 500 specs - Be specific natalie goldberg summary - Essex county college nursing - Pharmacology final exam nursing - Structural devices in literature - Algebra homework and quiz for $10 - Physics ray diagrams worksheet - Abraham lincoln's letter to his son's teacher questions answers pdf - For cause and comrades essay - Koi moddle - Ope final - What is in floraspring - Indian standard code list - Zachistan - Classical argument position paper - Disney informative speech outline - Bromothymol blue acid or base - Company sales invoices census data and trade association statistics - Doctral program (IT) - Vcloud director compatibility matrix - Position Paper - Paul mccloskey obituary columbus ohio - Final - Cellphones should be allowed in school - Hypothesis for projectile motion - Alex's adventures in numberland pdf archive - Criminal justice/affidavit/complaint offense#3 - English for aviation oxford - Wwnorton com studyspace give me liberty - Ch 14 mini sim on integrated marketing communications - Persuasive speech on tanning beds - Book Repor - B1 test topic form - Literature review of courier management system - Papers kim.....2 pages due by 24 hours - British museum room 41 - Physical Geography final - Benefits package design for whom - Week iv pt 2a