diff --git a/bin/Testcode.class b/bin/Testcode.class index 2236c6e..c555213 100644 Binary files a/bin/Testcode.class and b/bin/Testcode.class differ diff --git a/src/Testcode.java b/src/Testcode.java index f76ca5e..1029ed1 100644 --- a/src/Testcode.java +++ b/src/Testcode.java @@ -32,15 +32,35 @@ public class Testcode { // Display a popup dialog and get user input String a = JOptionPane.showInputDialog("Please enter a verb (-ing):"); String b = JOptionPane.showInputDialog("Please enter a location:"); + String c = JOptionPane.showInputDialog("Please enter a color:"); + String d = JOptionPane.showInputDialog("Please enter an object in that color:"); + String e = JOptionPane.showInputDialog("Please enter a diffrent color:"); + String f = JOptionPane.showInputDialog("Please enter an object in that color:"); + String g = JOptionPane.showInputDialog("Please enter an adjective:"); + String h = JOptionPane.showInputDialog("Please enter an object"); if ((a == null || a.trim().isEmpty()) && (b == null || b.trim().isEmpty())) { - System.out.println("No words entered or both canceled."); + System.out.println("Missing word(s) or canceled."); } else if (a == null || a.trim().isEmpty()) { - System.out.println("The verb was not entered or canceled."); + System.out.println("Missing word(s) or canceled."); } else if (b == null || b.trim().isEmpty()) { - System.out.println("The location was not entered or canceled."); + System.out.println("Missing word(s) or canceled."); + } else if (c == null || c.trim().isEmpty()) { + System.out.println("Missing word(s) or canceled."); + } else if (d == null || d.trim().isEmpty()) { + System.out.println("Missing word(s) or canceled."); + } else if (e == null || e.trim().isEmpty()) { + System.out.println("Missing word(s) or canceled."); + } else if (f == null || f.trim().isEmpty()) { + System.out.println("Missing word(s) or canceled."); + } else if (g == null || g.trim().isEmpty()) { + System.out.println("Missing word(s) or canceled."); + } else if (h == null || h.trim().isEmpty()) { + System.out.println("Missing word(s) or canceled."); } else { - System.out.println("They were " + a + " throw a " + b ); + System.out.println("They where " + a + " throw a " + b + ". They're eyes where "); + System.out.println(c + " as the " + d + " They're hair as " + e + " as " + f + "."); + System.out.println("It was a " + g + " day, after a long journey they finally found their " + h); } } }