Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions Multi_IIIB/Multi_IIIB.depend
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,48 @@
1485554288 source:c:\users\andityaarifianto\documents\github\asd_multilist\multi_iii\list_relasi.cpp
"list_relasi.h"

1524910999 source:c:\users\aldi\desktop\prog\std\multi_iiib\list_child.cpp
"list_child.h"
"list_relasi.h"

1524758566 c:\users\aldi\desktop\prog\std\multi_iiib\list_child.h
<iostream>

1524919065 source:c:\users\aldi\desktop\prog\std\multi_iiib\list_parent.cpp
"list_parent.h"

1524643156 c:\users\aldi\desktop\prog\std\multi_iiib\list_parent.h
<iostream>
"list_relasi.h"

1524881689 c:\users\aldi\desktop\prog\std\multi_iiib\list_relasi.h
"list_relasi.h"
"list_child.h"
<iostream>

1524915346 source:c:\users\aldi\desktop\prog\std\multi_iiib\list_relasi.cpp
"list_relasi.h"

1524922218 source:c:\users\aldi\desktop\prog\std\multi_iiib\main.cpp
<iostream>
<conio.h>
<stdio.h>
<iostream>
<windows.h>
"list_child.h"
"list_parent.h"
"operation.h"

1524921707 source:c:\users\aldi\desktop\prog\std\multi_iiib\operation.cpp
"operation.h"

1524921658 c:\users\aldi\desktop\prog\std\multi_iiib\operation.h
"list_child.h"
"list_parent.h"
"list_relasi.h"
<conio.h>
<stdio.h>
<iostream>
<windows.h>
<ctime>

29 changes: 17 additions & 12 deletions Multi_IIIB/Multi_IIIB.layout
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,39 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="list_child.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="list_parent.cpp" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1074" topLine="0" />
<Cursor1 position="2405" topLine="66" />
</Cursor>
</File>
<File name="list_relasi.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="list_parent.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="90" topLine="6" />
<Cursor1 position="925" topLine="21" />
</Cursor>
</File>
<File name="list_parent.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="list_relasi.cpp" open="1" top="1" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1203" topLine="0" />
<Cursor1 position="406" topLine="0" />
</Cursor>
</File>
<File name="list_relasi.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="main.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="147" topLine="0" />
<Cursor1 position="146" topLine="0" />
</Cursor>
</File>
<File name="list_parent.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="list_relasi.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="398" topLine="3" />
<Cursor1 position="425" topLine="0" />
</Cursor>
</File>
<File name="main.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="list_child.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="255" topLine="0" />
<Cursor1 position="967" topLine="19" />
</Cursor>
</File>
<File name="list_child.cpp" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1390" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>
72 changes: 72 additions & 0 deletions Multi_IIIB/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Task_5 [2017/2018-II]
Task 5 : Circular Double Linked List

# DEADLINE = FEBRUARY 24TH, 2018 - 23:59

## Reading Material
* [git cheat sheet](https://education.github.com/git-cheat-sheet-education.pdf)
* [markdown cheat sheet](https://enterprise.github.com/downloads/en/markdown-cheatsheet.pdf)

## Workflow
1. FORK this repositori ASD_Task_5 to your GitHub account
2. CLONE ASD_Task_5 repository from YOUR OWN ACCOUNT
3. open and modify codes in *.cpp and *.h files inside project ASD_Task_5
4. write your code inside the provided space in each functions/procedures
5. COMMIT and PUSH your project to your account
6. create a Pull Request

Introduction to Double Circular Linked List <br>
Create a music player application to implement the double circular linked list data structure

##library integration
1. on Code::Blocks, go into menu project->Build Option
2. go to Linker Settings tab
3. click Add to add new lib function
4. type winmm
5. click OK

##list.h
modify the elemenList and List structure to implement Double Circular linked list

##list.cpp
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

##player.cpp
<i>these function are already defined:
* function to produce random integer<br> `int randomInt(int max_int);` <br>
* function to print music list inserted<br> `void printInfo(List L);` <br>
* function to play current music pointed by P<br> `void playMusic(address P);` <br>
</i>
TODO :
create function according to the header defined in player.h

* function to sort the music list by ID <br>
``` void sortListByID(List &L); ``` <br>

* function to play the music list from the first music and repeat the list n times <br>`void playRepeat(List &, int n);` <br>

* function to delete any music defined by its ID<br>
```void deleteMusicByID(List &L, infotype x);```

* function to shuffle the music list<br> `void shuffleList(List &);`<br>simple logic example: <br>

``` loop n times
P <- first
x = randomInt
for i to x,
move P to next element
delete after P
insert first P
```


##main.cpp
* modify the main menu progam
* run the application

Empty file added Multi_IIIB/artist.h
Empty file.
Binary file added Multi_IIIB/asset/musik1.wav
Binary file not shown.
Binary file added Multi_IIIB/asset/musik10.wav
Binary file not shown.
Binary file added Multi_IIIB/asset/musik11.wav
Binary file not shown.
Binary file added Multi_IIIB/asset/musik2.wav
Binary file not shown.
Binary file added Multi_IIIB/asset/musik3.wav
Binary file not shown.
Binary file added Multi_IIIB/asset/musik4.wav
Binary file not shown.
Binary file added Multi_IIIB/asset/musik5.wav
Binary file not shown.
Binary file added Multi_IIIB/asset/musik6.wav
Binary file not shown.
Binary file added Multi_IIIB/asset/musik7.wav
Binary file not shown.
Binary file added Multi_IIIB/asset/musik8.WAV
Binary file not shown.
Binary file added Multi_IIIB/asset/musik9.wav
Binary file not shown.
Binary file added Multi_IIIB/bin/Debug/Multi_IIIB.exe
Binary file not shown.
31 changes: 31 additions & 0 deletions Multi_IIIB/control.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include "control.h"

void addArtist(List_parent LP, int i){
infotype_parent x;
cout<<"Artis Name : ";cin>>x.name;
cout<<"Artist Genre : ";cin>>x.genre;
x.id = i++;
insertFirst(LP,alokasi(x));
}

void addSong(List_parent &LP, List_child &LC, List_relasi &LR){
infotype_parent xp;
address_parent P = findElmName(LP,xp);
cout<<"Name Artist : ";cin>>xp.name;

if(P==NULL){
cout<<"Artist Not Exist"<<endl;
}else{
infotype_child xc;
cout<<"Artis name "<<P->info.name<<" founded. \n";
cout<<"\n";
cout<<"input name Song : ";cin>>xc.name_song;
cout<<"input location Song : ";cin>>xc.name_loc;
xc.id_song++;
address_child Pc = alokasi(xc);
address_relasi Pr = alokasi(Pc);
insertLast(LC,Pc);
insertLast(LR,Pr);
}

}
14 changes: 14 additions & 0 deletions Multi_IIIB/control.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef CONTROL_H_INCLUDED
#define CONTROL_H_INCLUDED
#include <iostream>
#include "list_child.h"
#include "list_parent.h"
#include "list_relasi.h"

using namespace std;

void addArtist(List_parent LP);
void addSong(List_parent &LP, List_child &LC, List_relasi &LR);


#endif // CONTROL_H_INCLUDED
Loading