Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sem2-formative
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jack.webb
sem2-formative
Commits
454cf6b2
Commit
454cf6b2
authored
Mar 08, 2018
by
jackw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New1
parent
9a22fc37
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
15 deletions
+8
-15
Bounce.java
src/Bounce.java
+6
-2
ComplexTest.java
src/ComplexTest.java
+2
-13
No files found.
src/Bounce.java
View file @
454cf6b2
...
...
@@ -29,11 +29,15 @@ public class Bounce extends Application {
setup
();
Timeline
timeline
=
new
Timeline
(
new
KeyFrame
(
Duration
.
millis
(
20
),
new
EventHandler
<
ActionEvent
>()
{
// Change millis for speed of the ball
Timeline
timeline
=
new
Timeline
(
new
KeyFrame
(
Duration
.
millis
(
20
),
new
EventHandler
<
ActionEvent
>()
{
// Adjust doubles for angle the ball moves
double
dx
=
7
;
double
dy
=
3
;
@Override
public
void
handle
(
ActionEvent
t
)
{
// move the ball
...
...
src/ComplexTest.java
View file @
454cf6b2
...
...
@@ -43,18 +43,7 @@ class ComplexTest {
@Test
void
testToString
()
{
/*
toString
()
should
return
a
string
like
1.2
+
j3
.
4
where
1.2
is
the
real
part
*
and
3.4
the
imaginary
part
.
*
Complex
a
=
new
Complex
(
1.2
,
3.4
);
assertEquals
(
"1.2 + j3.4"
,
a
.
toString
());
Complex
b
=
new
Complex
(
1.2
,
0.0
);
assertEquals
(
"1.2"
,
b
.
toString
());
Complex
c
=
new
Complex
(
0.0
,
9.3
);
assertEquals
(
"j9.3"
,
c
.
toString
());
Complex
d
=
new
Complex
(
1.2
,
-
3.4
);
assertEquals
(
"1.2 - j3.4"
,
d
.
toString
());
}
}
}}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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