In this homework, you will design and implement a music database program. The

implementation will be based on trees.

The music files are located on different directories of the file system. The list of songs is kept

in a text file, “[url removed, login to view]”, which is in the same directory with your program. The file format


<list number>-<Artist>-<Song Name>-<Album>-<Year>-<Genre>-<Directory>

File lines keep no more than 256 characters. Fields may consist of more than one word and

are separated by the “-” character.

An example to this file is as follows:

1-MFO-New York Sokaklarinda-The Best Of MFO-1989-Rock-C:mp3MFO

2-MFO-Sakin Gelme-MVAB-1995-Rock-C:mp3MFO

3-Pink Floyd-High Hopes-The Division Bell-1994-Rock-C:mp3Pink Floyd

4-Enigma-Return to Innocence-The Cross of Changes-1994-New Age-C:mp3Enigma

5-John Williams-The Imperial March-SW 2 The Empire Strikes Back OST-1980-Classic-C:mp3Williams

6-Pink-Respect-Missundaztood-2001-Pop Rock-C:mp3Pink

If there are more than one word in any of the fields (Artist, Song Name, etc.), each word must

be treated as a keyword for the song. For example, the third song in the above example has

both “Pink” and “Floyd” as keywords for the artist field. Thus, this song must be found when

“Pink” or “Floyd” is searched as artist. Your search algorithm, therefore, reduces to keyword

search in specific fields. The keyword search function MUST be recursive.

Search must also be case-insensitive for ease of use. If multiple matches are found, all of

them must be displayed.

When the program is called from the command line, it must process the “[url removed, login to view]” file (not

“[url removed, login to view]”, and no other file name is allowed) and construct the tree(s) that will be used for

the keyword search. Then it should wait for the user’s preference (Artist/Song/Genre) for the

search category. Only the fields Artist, Song and Genre are the fields of interest for the search.

After setting the search category, it takes the keyword, performs the search and displays the

output(s). The output must provide the songs with full detail (all fields must be provided). If

no matches found, the program must output an appropriate message. After displaying the

output, the program must wait for a new search.

Since the lengths of the words are not equal, while constructing the tree structure(s), you may

need to use a flag to mark the nodes that keywords end. For example:

An example to a single path is shown (with solid lines) above. The “keyword end” flag is set

at the node where a specific keyword is finished. The associated song list number(s) is (are)

also recorded in the node. Of course, you may use your own tree structure and marking

policy, as long as you explain them clearly.

The number of the songs cannot be limited. There may be unlimited number of songs for a

fixed keyword (i.e., you cannot limit the number of song indexes that can be kept on a node).

The fields Artist/Album/Genre of the songs are spelled using English characters. You may

assume that there is no number or punctuation in these fields.


Please keep in mind that, documentation is for helping others (e.g. your assistant) to

understand your code. Therefore, in your report, clearly explain all of your data structures and

algorithm(s). Inline documentation is also very important. Therefore, use meaningful

variable/function names in your code and explain their usage, when necessary. It is your

responsibility to write readable code and explain your approach clearly.


1) Note that for a 26-character alphabet, the number of possible combinations for a

length-N word is 26N. So, you may consider avoiding unnecessary tree branches.

2) Spend as less time as possible for string operations (use string.h). This homework is

on trees, not string operations.

Taidot: C-ohjelmointi

Näytä lisää: write a recursive function, use of trees in data structure, use of tree data structure, use of data structures, used structures, tree structure in c, tree structure algorithm, trees structure, trees search, trees in data structures, trees in data structure in c, trees in data structure, trees in c data structures, trees in algorithm, trees data structures, trees data structure in c, trees data structure, trees c, tree program in data structure, tree operations in data structure

Tietoa työnantajasta:
( 0 arvostelua ) ankara, Turkey

Projektin tunnus: #205347

Myönnetty käyttäjälle:


Hi ! I'm a professional programmer. I have many experience in C/C++, database. I'll do it best for you. I'm looking forward from your reply!

$30 USD 0 päivässä
(0 Arvostelua)

7 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön


I'm a professional of CC++. And I made a program like that. Pls check our PMB.

$90 USD 1 päivässä
(0 arvostelua)

hi, sir. I am very interested in your project. Please see PMB for more detail, Thanks.

$80 USD 2 päivässä
(0 arvostelua)

This project is required one csv file parser, which parsed with (-) seperater as well as require to implement good searching algorithm which should be very much efficient.

$85 USD 15 päivässä
(0 arvostelua)

I will make to you yours home work. The truth I badly know English. If it is pleasant you will pay if there is no that it is not necessary to pay.

$30 USD 2 päivässä
(0 arvostelua)

Well I can help you with this. Got some works in univercity, but I'll handle it. Contact if u r interested.

$50 USD 4 päivässä
(0 arvostelua)

hi..i can do this............

$80 USD 5 päivässä
(0 arvostelua)