Ask Computer Network & Security Expert

Name the program for this assignment "hashing_bst.cpp." This assignment is very similar to Assignment#6, accept you will be using a BST to handle collisions. As before, in this assignment you will write a program that maintains the names (first and last names), addresses and phone numbers in an address book by using a hash table. Use the data file called "client_address_data.txt" to help you create the hash table. Also, you should be able to enter, delete, modify (names, addresses and phone numbers), or search the data stored in hash table based on the name. A client's first and last names should be the search key. Once the program is finish execution, the information should be ordered by last name and first name and printed to a file called "sortbst_client_data.txt."

Design a class to represent the hash table. Call this class "Client_Address_Book". "Client_Address_Book" contains all the information for each client (first name, last name, address, and phone number). Use a linear function (eg. h(last name)=[ascii char value of first letter of lastname]-64) to determine the location of a key in the hash table. Each cell in the hash table will be a BST. For example, you will have a BST for last names that begin with 'A', there will be one for last names that begin with 'B', and so forth. The BST will also be used to handle collisions (clients with the same name) within "Client_Address_Book". Each BST will maintain the address book in alphabetical order.

When the clients address book is printed, the BST of all the clients' information stored in the hash table should be printed in order according to the last and first names. The information should be printed out in the following order: last name, first name, address, and phone number. Also, include column titles.

Declare and implement the following classes: BST_Node, Clients_Info_BST, and Clients_Address_Book. Store the declaration and implement files in one file call hashing_BST.cpp. You should submit hashing_BST.cpp to blackboard before due date and time.

Good Luck.... " .

Consider the following skeleton as a hint to help you:

#include

#include

using namespace std;


class BST_Node //node in a BST

{

public:

string lastname, firstname, address, phone_number;

BST_Node *lchild, *rchild; //left and right children pointers

};


class Clients_Info_BST //Binary Search Tree

{

public:

Clients_Info_BST(){};//store the data in the hash table

//Clients_Info_BST(const Clients_Info_BST &);//Copy Constructor

~Clients_Info_BST(){};//destructor

//void Insert(const string & s){cout<<" Inside Client_Info_BST Insert\n";};

// void Remove(const string & s){cout<<" Inside Client_Info_BST Remove\n";};

// void Update(const string & s){cout<<" Inside Client_Info_BST Update\n";};

// void Print( ){cout<<" Inside Client_Info_BST Print\n";};

// BST_Node * Search(const string & s){cout<<" Inside Client_Info_BST Search\n"; return 0;};


//other member functions you may need.

private:

BST_Node *front; //---state information
};

class Client_Address_Book

{

public:

Client_Address_Book(){};//default constructor will read data from input file "client_address_data.txt".

//Client_Address_Book(const Client_Address_Book &);//Copy Constructor

// void Insert(const string & s);// insert record

// void Remove(const string & s);//remove record

// void Update(const string & s);//update record

// void Print_BST(const string & s);//ornt

// void Print_Hash_Table(){"Inside Client_Address_Book Print_Hash_Table\n";};

// void Print_Hash_Table_to_File(const string & filename);///function will print hash table to output file

// BST_Node * Search(const string & s){"Inside Client_Address_Book Search\n"; return 0;};

// unsigned int Hash_Function(const string & s);


// Hint: Remember that the insert, remove and search function for Clients_Address_Book will use //

//Client_Info_BST's insert, remove and search respectively.


private:

Clients_Info_BST hash_table[27]; //or 26 or whatever you like

};

int main()

{

};

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M91389731
  • Price:- $40

Guranteed 36 Hours Delivery, In Price:- $40

Have any Question?


Related Questions in Computer Network & Security

Security challenges in emerging networksassignment

Security Challenges in Emerging Networks Assignment Description The purpose of this assignment is to develop skills to independently think of innovation. In this assignment students will first learn how to develop knowle ...

Security challenges in emerging networksassignment

Security Challenges in Emerging Networks Assignment Description The purpose of this assignment is to develop skills to independently think of innovation. In this assignment students will first learn how to develop knowle ...

Security challenges in emerging networksassignment

Security Challenges in Emerging Networks Assignment Description The purpose of this assignment is to develop skills to independently think of innovation. In this assignment students will first learn how to develop knowle ...

Security challenges in emerging networksassignment

Security Challenges in Emerging Networks Assignment Description The purpose of this assignment is to develop skills to independently think of innovation. In this assignment students will first learn how to develop knowle ...

Advanced network design assessment - human factors in

Advanced Network Design Assessment - Human factors in network analysis and design Purpose of the assessment - This assignment is designed to assess students' knowledge and skills related to the following learning outcome ...

Advanced network design assessment - human factors in

Advanced Network Design Assessment - Human factors in network analysis and design Purpose of the assessment - This assignment is designed to assess students' knowledge and skills related to the following learning outcome ...

Assignment descriptionproject scope a typical network

Assignment Description Project Scope: A typical network layout diagram of a firm is given below for illustrative purposes only. The service requirements are enclosed. Figure. Network layout of a firm Service requirements ...

Assignment descriptionproject scope a typical network

Assignment Description Project Scope: A typical network layout diagram of a firm is given below for illustrative purposes only. The service requirements are enclosed. Figure. Network layout of a firm Service requirements ...

After reading this weeks materials please respond to two 2

After reading this week's materials, please respond to TWO (2) of the following questions. AND PROVIDE CITATION IN APA 1. Describe the differences between bus, ring, star and mesh topologies. 2. Explain the TCP/IP Model ...

The abstract should not be more than 250 words describe

The abstract should not be more than 250 words. Describe your project, focusing on research questions and research method for next stage of the project. 1. Introduction [The introduction should describe what the project ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As