summaryrefslogtreecommitdiffstats
path: root/Java/BlackJack/CardTester.java
diff options
context:
space:
mode:
authormsglm <msglm@techchud.xyz>2023-01-14 05:31:48 -0600
committermsglm <msglm@techchud.xyz>2023-01-14 05:31:48 -0600
commit9d53d8857eaa1c9405894a88ca75bc4657e42f35 (patch)
treeeb1efc1d028b949dd83bb710c68be8eff58f26e7 /Java/BlackJack/CardTester.java
downloadschool-code-master.tar.gz
school-code-master.tar.bz2
school-code-master.zip
Inital CommitHEADmaster
Diffstat (limited to 'Java/BlackJack/CardTester.java')
-rw-r--r--Java/BlackJack/CardTester.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/Java/BlackJack/CardTester.java b/Java/BlackJack/CardTester.java
new file mode 100644
index 0000000..5655ea2
--- /dev/null
+++ b/Java/BlackJack/CardTester.java
@@ -0,0 +1,30 @@
+/* CardTester.java
+Name: Nancy Reddig, Academy Instructor
+Date: 5/15/03
+Modified by:
+Carl Frank, 08/29/07
+Modifications were to not allow access to instance variables of Card.
+The assumptions are that these will be private.
+Use this class to test your Card Class
+Program that tests the Card Class*/
+// Java packages
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*; // program uses JOptionPane
+public class CardTester {
+// main method begins execution of Java application
+public static void main( String args[] ) {
+
+Card card1= new Card("King", "Hearts");
+// allow the user to think that they are dealing a random card
+
+JOptionPane.showMessageDialog(null, "Deal a Card",
+"Card", JOptionPane.INFORMATION_MESSAGE );
+//display the card
+JOptionPane.showMessageDialog( null, "The card is the " + card1.getFaceValue() + " of " //copying code from a pdf and having to debug it? Now this is a new low
+ + card1.getSuit(),
+ "Your Card", JOptionPane.PLAIN_MESSAGE );
+
+System.exit(0);
+}
+}