Task 4 : Circular Double Linked List
- FORK this repositori ASD_Task_4 to your GitHub account
- CLONE ASD_Task_4 repository from YOUR OWN ACCOUNT
- open and modify codes in *.cpp and *.h files inside project ASD_Task_4
- write your code inside the provided space in each functions/procedures
- COMMIT and PUSH your project to your account
- create a Pull Request
Introduction to Double Circular Linked List
Create a music player application to implement the double circular linked list data structure
- on Code::Blocks, go into menu project->Build Option
- go to Linker Settings tab
- click
Add
to add new lib function - type
winmm
- click OK
modify the elemenList and List structure to implement Double Circular linked list
- use only one head
modify each function to fit the data structure
createList
allocate
,deallocate
insertFirst
,insertLast
,insertAfter
deleteFirst
,deleteLast
,deleteAfter
findElmByID
,findElmByName
to implement Double Circular Linked List mechanism
these function are already defined:
int randomInt(int max_int);
function to produce random integervoid printInfo(List L);
function to print music list inserted to List Lvoid playMusic(address P);
function to play current music pointed by P
-
function to play the music list from the first music and repeat the list n times
void playRepeat(List &, int n);
-
function to delete any music defined by its ID
void deleteMusicByID(List &L, infotype x);
-
function to shuffle the order of the music list
void shuffleList(List &);
simple logic example:
repeat n times
P <- first
x = randomInt
for i to x,
move P to next element
delete after P
insert first P
end repeat
you can define another mechanism to shuffle the order
- modify the main menu progam
- run the application