Skip to content

Commit 2ca6f86

Browse files
committed
Fixed #4 + Fixed #5 + Fixed #6 + Fixed #8 + Fixed #9 + Fixed #12
1 parent d1bca13 commit 2ca6f86

30 files changed

+3372
-318
lines changed

README.md

Lines changed: 72 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@
66

77
![Maintenance](https://img.shields.io/maintenance/yes/2020)
88
![Build](https://img.shields.io/badge/Build-1.0.0.0-brightgreen)
9-
![GitHub release (latest by date)](https://img.shields.io/github/v/release/bomrafinha/Ordenacao)
10-
![GitHub Release Date](https://img.shields.io/github/release-date/bomrafinha/Ordenacao)
11-
![Github repo age](https://img.shields.io/github/issues/detail/age/bomrafinha/Ordenacao/1.svg?style=flat-square)
12-
![Github author](https://img.shields.io/github/issues/detail/u/bomrafinha/Ordenacao/1.svg?style=flat-square)
9+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/bomrafinha/SortingAlgorithms)
10+
![GitHub Release Date](https://img.shields.io/github/release-date/bomrafinha/SortingAlgorithms)
11+
![Github repo age](https://img.shields.io/github/issues/detail/age/bomrafinha/SortingAlgorithms/1.svg?style=flat-square)
12+
![Github author](https://img.shields.io/github/issues/detail/u/bomrafinha/SortingAlgorithms/1.svg?style=flat-square)
1313

14-
![GitHub contributors](https://img.shields.io/github/contributors/bomrafinha/Ordenacao)
15-
![GitHub last commit](https://img.shields.io/github/last-commit/bomrafinha/Ordenacao)
16-
![GitHub commit activity](https://img.shields.io/github/commit-activity/y/bomrafinha/Ordenacao.svg?style=flat-square)
14+
![GitHub contributors](https://img.shields.io/github/contributors/bomrafinha/SortingAlgorithms)
15+
![GitHub last commit](https://img.shields.io/github/last-commit/bomrafinha/SortingAlgorithms)
16+
![GitHub commit activity](https://img.shields.io/github/commit-activity/y/bomrafinha/SortingAlgorithms.svg?style=flat-square)
1717

18-
![GitHub issues](https://img.shields.io/github/issues/bomrafinha/Ordenacao)
19-
![GitHub closed issues](https://img.shields.io/github/issues-closed/bomrafinha/Ordenacao)
20-
![GitHub pull requests](https://img.shields.io/github/issues-pr/bomrafinha/Ordenacao)
21-
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/bomrafinha/Ordenacao)
22-
![GitHub forks](https://img.shields.io/github/forks/bomrafinha/Ordenacao)
23-
![GitHub stars](https://img.shields.io/github/stars/bomrafinha/Ordenacao)
24-
![GitHub All Releases](https://img.shields.io/github/downloads/bomrafinha/Ordenacao/total)
18+
![GitHub issues](https://img.shields.io/github/issues/bomrafinha/SortingAlgorithms)
19+
![GitHub closed issues](https://img.shields.io/github/issues-closed/bomrafinha/SortingAlgorithms)
20+
![GitHub pull requests](https://img.shields.io/github/issues-pr/bomrafinha/SortingAlgorithms)
21+
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/bomrafinha/SortingAlgorithms)
22+
![GitHub forks](https://img.shields.io/github/forks/bomrafinha/SortingAlgorithms)
23+
![GitHub stars](https://img.shields.io/github/stars/bomrafinha/SortingAlgorithms)
24+
![GitHub All Releases](https://img.shields.io/github/downloads/bomrafinha/SortingAlgorithms/total)
2525

26-
![GitHub top language](https://img.shields.io/github/languages/top/bomrafinha/Ordenacao)
27-
![GitHub language count](https://img.shields.io/github/languages/count/bomrafinha/Ordenacao)
28-
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/bomrafinha/Ordenacao)
26+
![GitHub top language](https://img.shields.io/github/languages/top/bomrafinha/SortingAlgorithms)
27+
![GitHub language count](https://img.shields.io/github/languages/count/bomrafinha/SortingAlgorithms)
28+
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/bomrafinha/SortingAlgorithms)
2929

30-
![GitHub](https://img.shields.io/github/license/bomrafinha/Ordenacao)
30+
![GitHub](https://img.shields.io/github/license/bomrafinha/SortingAlgorithms)
3131

3232
<br />
3333

@@ -53,7 +53,7 @@
5353

5454
<br />
5555

56-
## [Sitemap](https://coggle.it) <a name="sitemap"></a>
56+
## [Sitemap](https://coggle.it/diagram/XoYMQknCLnN4AiG_/t/sortingalgorithms/b5af2e2a2462c3902697b70700706b3bb400f72cea88fc201b92409f637f7d35) <a name="sitemap"></a>
5757
![Sitemap](documentation/images/sitemap.png)
5858

5959
<br />
@@ -71,7 +71,7 @@
7171
<br />
7272

7373
## Workgroup <a name="workgroup"></a>
74-
Deve-se manter a ordem de compilação do projeto como na imagem.
74+
Deve-se manter a ordem de compilação do projeto como na imagem. Interfaces sempre no primeiro pacote *SortInterfaces.bpl*, e a visualização no executável *Sorting.exe* que será sempre o último pacote.
7575

7676
![Workgroup](documentation/images/workgroup.png)
7777

@@ -137,7 +137,7 @@ Para criar uma *issue* atente para o seguinte:
137137

138138
## Padronização de Código <a name="source"></a>
139139
### Versionamento
140-
Para versionar esse repositório deve-se usar como base o versionamento para windows 32 bits do Ordenacao.Executavel.exe, da forma que se segue:
140+
Para versionar esse repositório deve-se usar como base o versionamento para windows 32 bits do Sorting.exe, da forma que se segue:
141141

142142
![Versionamento](documentation/images/versionamento.png)
143143
#### onde:
@@ -239,26 +239,72 @@ Separar declações de variáveis, métodos, construtores, destrutores e proprie
239239
- Interface *ISort*
240240
- Estruturação/Criação dos pacotes
241241

242+
+ Algoritmos
243+
- Bubble Sort
244+
- Insertion Sort
245+
- Selection Sort
246+
- Comb Sort
247+
242248
<br />
243249

244250
## Árvore do Projeto <a name="arvore"></a>
245251
```
246-
Ordenacao
252+
SortingAlgorithms
247253
├── app
248254
│ └── .gitkeep
249255
├── documentation
250256
│ └── images
251-
│ └── .gitkeep
257+
│ ├── label_issue.png
258+
│ ├── padrao_blocos_01.png
259+
│ ├── padrao_blocos_02.png
260+
│ ├── padrao_chamadas_01.png
261+
│ ├── padrao_chamadas_02.png
262+
│ ├── padrao_classes.png
263+
│ ├── padrao_identacao_01.png
264+
│ ├── padrao_interfaces.png
265+
│ ├── padrao_metodos.png
266+
│ ├── padrao_propriedades.png
267+
│ ├── padrao_variaveis_locais.png
268+
│ ├── padrao_variaveis_privadas.png
269+
│ ├── project_issue.png
270+
│ ├── sitemap.png
271+
│ ├── versionamento.png
272+
│ └── workgroup.png
252273
├── images
253274
│ └── .gitkeep
254275
├── modules
255-
│ └── .gitkeep
276+
│ ├── BubbleSort
277+
│ │ └── U_Sort.Bubble.pas
278+
│ ├── CombSort
279+
│ │ └── U_Sort.Comb.pas
280+
│ ├── InsertionSort
281+
│ │ └── U_Sort.Insertion.pas
282+
│ └── SelectionSort
283+
│ └── U_Sort.Selection.pas
256284
├── output
257285
│ └── .gitkeep
258286
├── project
259-
│ └── .gitkeep
287+
│ ├── BubbleSort.dpk
288+
│ ├── BubbleSort.dproj
289+
│ ├── CombSort.dpk
290+
│ ├── CombSort.dproj
291+
│ ├── InsertionSort.dpk
292+
│ ├── InsertionSort.dproj
293+
│ ├── SelectionSort.dpk
294+
│ ├── SelectionSort.dproj
295+
│ ├── Sorting.dpr
296+
│ ├── Sorting.dproj
297+
│ ├── SortingAlgorithms.groupproj
298+
│ ├── SortInterfaces.dpk
299+
│ └── SortInterfaces.dproj
260300
├── src
261-
│ └── .gitkeep
301+
│ ├── Sorting
302+
│ │ ├── U_Sorting.Viewer.fmx
303+
│ │ └── U_Sorting.Viewer.pas
304+
│ └── SortInterfaces
305+
│ ├── U_Sort.DTO.Retangle.pas
306+
│ ├── U_SortClass.pas
307+
│ └── U_SortInterface.pas
262308
├── vendor
263309
│ └── .gitkeep
264310
├── .gitattributes

documentation/images/sitemap.png

37 KB
Loading

documentation/images/workgroup.png

9.48 KB
Loading

modules/.gitkeep

Whitespace-only changes.
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
unit U_Sort_01; //Bubble Sort
1+
unit U_Sort.Bubble;
22

33
interface
44

5-
uses U_Sort, FMX.Layouts, System.Classes, Winapi.Windows, FMX.Dialogs,
6-
FMX.Objects, System.SysUtils;
5+
uses U_SortClass, U_SortInterface, FMX.Layouts, System.SysUtils;
76

87
type
9-
TSort01 = class(TSort)
8+
TSortBubble = class(TSortClass, ISortInterface<TLayout>)
109
private
1110
procedure sort(layout01 : TLayout);
1211

@@ -16,17 +15,17 @@ TSort01 = class(TSort)
1615

1716
implementation
1817

19-
{ TSort01 }
18+
{ TSortBubble }
2019

21-
constructor TSort01.Create(layout01: TLayout);
20+
constructor TSortBubble.Create(layout01: TLayout);
2221
begin
2322
inherited Create(layout01);
2423
sleep(2000);
2524
sort(layout01);
2625

2726
end;
2827

29-
procedure TSort01.sort(layout01: TLayout);
28+
procedure TSortBubble.sort(layout01: TLayout);
3029
var
3130
i, j : Integer;
3231

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
unit U_Sort_04; //Comb Sort
1+
unit U_Sort.Comb;
22

33
interface
44

5-
uses U_Sort, FMX.Layouts, System.Classes, Winapi.Windows, FMX.Dialogs,
6-
FMX.Objects, System.SysUtils;
5+
uses U_SortClass, U_SortInterface, FMX.Layouts, System.SysUtils;
76

87
type
9-
TSort04 = class(TSort)
8+
TSortComb = class(TSortClass, ISortInterface<TLayout>)
109
private
1110
procedure sort(layout01 : TLayout);
1211

@@ -16,17 +15,17 @@ TSort04 = class(TSort)
1615

1716
implementation
1817

19-
{ TSort04 }
18+
{ TSortComb }
2019

21-
constructor TSort04.Create(layout01: TLayout);
20+
constructor TSortComb.Create(layout01: TLayout);
2221
begin
2322
inherited Create(layout01);
2423
sleep(2000);
2524
sort(layout01);
2625

2726
end;
2827

29-
procedure TSort04.sort(layout01: TLayout);
28+
procedure TSortComb.sort(layout01: TLayout);
3029
var
3130
i, gap, tamanho : Integer;
3231

modules/U_Sort_02.pas renamed to modules/InsertionSort/U_Sort.Insertion.pas

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
unit U_Sort_02; //Insertion Sort
1+
unit U_Sort.Insertion;
22

33
interface
44

5-
uses U_Sort, FMX.Layouts, System.Classes, Winapi.Windows, FMX.Dialogs,
6-
FMX.Objects, System.SysUtils;
5+
uses U_SortClass, U_SortInterface, FMX.Layouts, System.SysUtils;
76

87
type
9-
TSort02 = class(TSort)
8+
TSortInsertion = class(TSortClass, ISortInterface<TLayout>)
109
private
1110
procedure sort(layout01 : TLayout);
1211

@@ -16,17 +15,17 @@ TSort02 = class(TSort)
1615

1716
implementation
1817

19-
{ TSort02 }
18+
{ TSortInsertion }
2019

21-
constructor TSort02.Create(layout01: TLayout);
20+
constructor TSortInsertion.Create(layout01: TLayout);
2221
begin
2322
inherited Create(layout01);
2423
sleep(2000);
2524
sort(layout01);
2625

2726
end;
2827

29-
procedure TSort02.sort(layout01: TLayout);
28+
procedure TSortInsertion.sort(layout01: TLayout);
3029
var
3130
i, j : Integer;
3231
key : Single;

modules/U_Sort_03.pas renamed to modules/SelectionSort/U_Sort.Selection.pas

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
unit U_Sort_03; //Selection Sort
1+
unit U_Sort.Selection;
22

33
interface
44

5-
uses U_Sort, FMX.Layouts, System.Classes, Winapi.Windows, FMX.Dialogs,
6-
FMX.Objects, System.SysUtils;
5+
uses U_SortClass, U_SortInterface, FMX.Layouts, System.SysUtils;
76

87
type
9-
TSort03 = class(TSort)
8+
TSortSelection = class(TSortClass, ISortInterface<TLayout>)
109
private
1110
procedure sort(layout01 : TLayout);
1211

@@ -16,17 +15,17 @@ TSort03 = class(TSort)
1615

1716
implementation
1817

19-
{ TSort03 }
18+
{ TSortSelection }
2019

21-
constructor TSort03.Create(layout01: TLayout);
20+
constructor TSortSelection.Create(layout01: TLayout);
2221
begin
2322
inherited Create(layout01);
2423
sleep(2000);
2524
sort(layout01);
2625

2726
end;
2827

29-
procedure TSort03.sort(layout01: TLayout);
28+
procedure TSortSelection.sort(layout01: TLayout);
3029
var
3130
i, j, min : Integer;
3231

project/BubbleSort.dpk

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package BubbleSort;
2+
3+
{$R *.res}
4+
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
5+
{$ALIGN 8}
6+
{$ASSERTIONS ON}
7+
{$BOOLEVAL OFF}
8+
{$DEBUGINFO OFF}
9+
{$EXTENDEDSYNTAX ON}
10+
{$IMPORTEDDATA ON}
11+
{$IOCHECKS ON}
12+
{$LOCALSYMBOLS ON}
13+
{$LONGSTRINGS ON}
14+
{$OPENSTRINGS ON}
15+
{$OPTIMIZATION OFF}
16+
{$OVERFLOWCHECKS OFF}
17+
{$RANGECHECKS OFF}
18+
{$REFERENCEINFO ON}
19+
{$SAFEDIVIDE OFF}
20+
{$STACKFRAMES ON}
21+
{$TYPEDADDRESS OFF}
22+
{$VARSTRINGCHECKS ON}
23+
{$WRITEABLECONST OFF}
24+
{$MINENUMSIZE 1}
25+
{$IMAGEBASE $400000}
26+
{$DEFINE DEBUG}
27+
{$ENDIF IMPLICITBUILDING}
28+
{$IMPLICITBUILD ON}
29+
30+
requires
31+
rtl,
32+
SortInterfaces;
33+
34+
contains
35+
U_Sort.Bubble in '..\modules\BubbleSort\U_Sort.Bubble.pas';
36+
37+
end.

0 commit comments

Comments
 (0)