-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.rtf
103 lines (103 loc) · 3.7 KB
/
README.rtf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Riched20 10.0.17134}\viewkind4\uc1
\pard\sl276\slmult1\b\f0\fs22\lang9 Delfinen\b0\par
This program holdes all information on members in the swimming club Delfinen. \par
as a formand you can create, edit and terminate members.\par
as a kasserer you have the ability to check how has not payed for their membership\par
and set payments for members that have payed for their membership.\par
as a trainer you can keep track of and find your best swimmers both in competitions and training results .\par
You can also set new results.\par
\par
\b Motivation\b0\par
We found the swimming club Delfinen to be an extremely interesting club with altruistic principles + they payed is in twix to make the program, so.. we made the program.\par
\par
\b Build status\b0\par
The program is functionel and all necessary components are functional. For further work, adding following funktions is top priority:\par
\tab\par
- covering all code in test funktions\par
\par
- adding maven dependencies to the project to make setup easier\par
\par
----\tab\par
\par
\b\par
Installation\par
\b0\par
import the zip file in netbeans \par
download \par
Gson-2,8,5.jar\par
java-json.jar\par
jdk1,8\par
run the program from Delfinen in the package Presentation\par
\par
js-standard-style\par
\par
Tech/framework used\par
NetBeans\par
\par
\par
\b Code Example\b0\par
public String[] FindTopFiveId(int distance, String Id) \{\par
String[] topFive = \{"", "", "", "", "","","","","",""\};\par
List<TrainingResults> list = acc.getTrainingResults();\par
String bestTimeId = "";\par
double max = Double.MAX_VALUE;\par
int bestTimeIndex = 0;\par
int topFiveIndex = 0;\par
double bestTime;\par
Member member = null;\par
for (int i = 0; i < 5; i++) \{\par
for (int u = 0; u < list.size(); u++) \{\par
TrainingResults TR = list.get(u);\par
if (distance == TR.getDistance()) \{\par
double thisTR = TR.getTime();\par
if (thisTR < max && TR.getId().equals(Id)) \{\par
bestTime = thisTR;\par
max = TR.getTime();\par
bestTimeId = TR.getId();\par
bestTimeIndex = u;\par
member = acc.getMember(bestTimeId);\par
\par
\}\par
\}\par
\par
\}\par
\par
\par
if(member != null)\{\par
topFive[topFiveIndex] = member.getName();\par
topFiveIndex++;\par
topFive[topFiveIndex] = Integer.toString((int) max);\par
topFiveIndex++;\par
member = null;\par
list.remove(bestTimeIndex);\par
\}\par
\par
max = Double.MAX_VALUE;\par
bestTimeId = "";\par
\par
\}\par
return topFive;\par
\par
\par
\b Tests\b0\par
Install TikiOne JaCoCoverage plugin.\par
We use that to make sure our code coverage is around 80%. To use it, right click project and test with JaCoCoverage.\par
To run all tests, run TestSuite in Test Package.\par
\par
\par
\par
\b Contribute\b0\par
Created by:\par
Mikkel Kornval Christoffersen\par
Nikolaj Tost S\'f8g\'e5rd\par
Malte Hviid-Magnussen\par
Benjamin Kongshaug\par
\b\par
Credits\par
\b0 Give proper credits. This could be a link to any repo which inspired you to build this project, any blogposts or links to people who contrbuted in this project.\par
\par
\par
MIT \'a9 team 5 CPH boys\par
}