Commit 454cf6b2 authored by jackw's avatar jackw

New1

parent 9a22fc37
......@@ -28,11 +28,15 @@ public class Bounce extends Application {
s.show();
setup();
// Change millis for speed of the ball
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(20), new EventHandler<ActionEvent>() {
// Change millis for speed of the ball
// Adjust doubles for angle the ball moves
double dx = 7;
double dy = 3;
@Override
public void handle(ActionEvent t) {
......
......@@ -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());
}
}
}}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment