Færdiggjort

Hash Table

Develop a library catalog program. This program will use a HASH TABLE to keep track of the books in the library. Your program will initially read a document which contains all of the books in the library (book #, name, and location). For simplicity, the book names will be a single word. The file will look something like this:

2456 Pinocchio C17

8796 Cinderella D22

9726 LandBeforeTime A17. The program should read the book number, the name, and the location, and insert the book into the hash table (use a struct to the book information). Once all the books are in the catalog (hash table), display the following menu:

1. Find a book

2. Show the Hash Table

3. Exit

To complete this assignment, define a class called HashTable. The class has the following function:

**int hash(int bookNum);**

//a function that determines the location a book should go in.

//This function will return the bookNum mod 1000 (i.e: 2354 % 1000)

**void put (Book newBook);**

//adds the book to the hash table (calls hash() function to determine where the book should go)

//Uses linear probing to resolve collisions.

**Book get(int bookNum);**

//Returns the book in the hash table if it is found. Returns null if book is not found.

//Record should be retrived by using hashing.

**void display(int lowerbound, int upperbound);**

//prints the books between the lowerbound and the upperbound

Book catalog[1000]; //Private variable. Array of 1000 books (the hash table that stores the books) Must have 3 files 2 .cpp and 1 .h

If your work is accepted.....i will need to email you the rest of the details for option 1, 2, and 3.

Evner: C programmering

Se mere: variable programming, struct in cpp, struct c programming, struct cpp, rest programming, programming variable, programming in go book, programming hash, programming define, programming books, programming array, must read programming books, mod programming, hash programming, go programming book, define programming, define linear programming, define c programming, c programming struct, c programming find function

Om arbejdsgiveren:
( 4 bedømmelser ) United States

Projekt ID: #2789117

Tildelt til:

ovidiuv

See private message.

$12 USD in 4 dage
(113 bedømmelser)
5.0

8 freelancere byder i gennemsnit $17 på dette job

Schura

See private message.

$21.25 USD in 4 dage
(27 bedømmelser)
4.8
HaoPX

See private message.

$15 USD in 4 dage
(3 bedømmelser)
2.3
hoanglong1712

See private message.

$21.25 USD in 4 dage
(5 bedømmelser)
2.3
gufeatza

See private message.

$20.4 USD in 4 dage
(5 bedømmelser)
0.6
vaibhavsingla

See private message.

$10 USD in 4 dage
(0 bedømmelser)
0.0
oleksandrpvw

See private message.

$15 USD in 4 dage
(0 bedømmelser)
0.0
xainnasir

See private message.

$10 USD in 4 dage
(0 bedømmelser)
0.0
seifert

See private message.

$21.25 USD in 4 dage
(0 bedømmelser)
0.0