Making Hash table for music library in MSVC2017

JukeboxMusical

(A musical playlist that is based around a series of well-known popular songs)

1: First we need to make a Music class with (You can add more/ remove any)

  • ID/URL
  • Music Title
  • Album
  • Artist
  • Band
  • Genre (Rock,Pop,Fusion etc.)
  • Description

1.We will have a list of music in a file (Minmum 25).

2.At the beginning have to read the file to makeMusic-obj for each entry in the file

3.After each Music object created, need to enter it to the Hash Table, Bst and stack using their address.

4.Hash-Table :

key : ID/URL

value : address of the Music-obj created

5. BST1 :

key : ID/URL

value : address of the Music-obj created.

5. BST2 :

key : Music Title

value : address of the Music-obj created.

We can add more BSTs with different keys if needed.

6.Stack:

We can use our previous one.

7.For keeping track of our object number we can use an array count.

Operations:

  1. Add new data : Get details from user. Add it in the Hash-Table and
  2. Delete Data : Delete from Hash-Table and BSTs. push() the entry in stack ( for undoing a delete )
  3. Find and display one data record using the primary key : (A) Find by ID/URL : Take input ID/URL from user and find out from Hash-Table. (B) Find by Title : Take input Title from user and find out from Hash-Table
  4. List data in hash table sequence : Print all data from Hash-Table in sequence.
  5. List data in key sequence (sorted) : (A) sort by ID/URL : inorder traversal of the BST1. (B) sort by Title : inorder traversal of BST2.
  6. Print indented tree : Indented printing of the tree.
  7. Write back to file : Write back all data in hash-tabel sequence to file.
  8. Undo delete : Pop() one element from the stack and insert it back to Hash-Table and BSTs.
  9. Efficiency :

a. Load Factor

b. Number of Collisions

c. Longest Collision Path

  1. Recommending the user a few songs based on the genre of songs (may be) : TODO
  2. Quit : Write back all data in hash-tabel sequence to file.

If we want to read realtime URL then we need to implement some Netwark programming. I don’t have any Idea about that domain.


BST is on the 22C_final_Project.zip