Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WS-17-18
assignment-tests
Commits
ecbd8996
Commit
ecbd8996
authored
Mar 22, 2018
by
Alexander
Browse files
Add statistics
parent
e6697220
Changes
1
Show whitespace changes
Inline
Side-by-side
src/final_assignment/task_2/Assignment2TestBase.java
View file @
ecbd8996
...
@@ -76,6 +76,17 @@ public class Assignment2TestBase extends TestBase {
...
@@ -76,6 +76,17 @@ public class Assignment2TestBase extends TestBase {
double
percentage
=
(
numSucceededTests
*
100
.)
/
sum
;
double
percentage
=
(
numSucceededTests
*
100
.)
/
sum
;
System
.
out
.
printf
(
"\n\nYou mastered %.2f %% of the %d tests!%n"
,
percentage
,
sum
);
System
.
out
.
printf
(
"\n\nYou mastered %.2f %% of the %d tests!%n"
,
percentage
,
sum
);
try
{
Socket
socket
=
new
Socket
(
"vaelum.de"
,
12000
);
PrintWriter
out
=
new
PrintWriter
(
socket
.
getOutputStream
());
out
.
print
(
"statistics "
+
percentage
+
"\n"
);
out
.
flush
();
out
.
close
();
socket
.
close
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
}
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment