Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Exercise14_17.java, added import for FXMLLoader + Removed JUnit… #27

Merged
merged 1 commit into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions ch_08/Exercise08_13.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package ch_08;

import org.junit.Test;

import java.awt.*;
import java.util.*;

/**
Expand Down Expand Up @@ -52,4 +49,4 @@ public static int[] locateLargest(double[][] a) {
}
return largeIdx;
}
}
}
14 changes: 6 additions & 8 deletions ch_14/Exercise14_17.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package ch_14.exercise14_17;
package ch_14;

import javafx.application.Application;
import javafx.collections.ObservableList;
import javafx.scene.Node;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Arc;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Line;
import javafx.stage.Stage;

import java.io.FileInputStream;
import java.io.IOException;

/**
* 14.17 (Game: hangman) Write a program that displays a drawing for the popular hangman game, as shown in Figure 14.48a.
*/
Expand Down
2 changes: 1 addition & 1 deletion ch_18/Exercise18_01.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.math.BigInteger;
import java.util.Scanner;

import static org.junit.Assert.*;
import static resources.lib.UnitTest.*;

/**
* *18.1 (Factorial) Using the BigInteger class introduced in Section 10.9, you can
Expand Down
12 changes: 12 additions & 0 deletions resources/lib/UnitTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package resources.lib;

import java.math.BigInteger;

public class UnitTest {

public static void assertEquals(BigInteger b1, BigInteger b2) {
if (!b1.equals(b2)) {
throw new UnitTestException("Failed Unit Test, Expected: " + b1 + ", but got: " + b2);
}
}
}
8 changes: 8 additions & 0 deletions resources/lib/UnitTestException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package resources.lib;

public class UnitTestException extends AssertionError {

public UnitTestException(Object detailMessage) {
super(detailMessage);
}
}