aboutsummaryrefslogtreecommitdiffstats
path: root/csci1913
diff options
context:
space:
mode:
authorRossTheRoss <mstrapp@protonmail.com>2019-10-04 08:50:58 -0500
committerRossTheRoss <mstrapp@protonmail.com>2019-10-04 08:50:58 -0500
commitb9ee191da4d2a9b419964efae505a35aa88b0073 (patch)
tree84121bcf44107cfb24c686f4630031985eda026b /csci1913
parente (diff)
downloadhomework-b9ee191da4d2a9b419964efae505a35aa88b0073.tar
homework-b9ee191da4d2a9b419964efae505a35aa88b0073.tar.gz
homework-b9ee191da4d2a9b419964efae505a35aa88b0073.tar.bz2
homework-b9ee191da4d2a9b419964efae505a35aa88b0073.tar.lz
homework-b9ee191da4d2a9b419964efae505a35aa88b0073.tar.xz
homework-b9ee191da4d2a9b419964efae505a35aa88b0073.tar.zst
homework-b9ee191da4d2a9b419964efae505a35aa88b0073.zip
Put lab on Git
Diffstat (limited to 'csci1913')
-rw-r--r--csci1913/Java/Driver.java65
1 files changed, 65 insertions, 0 deletions
diff --git a/csci1913/Java/Driver.java b/csci1913/Java/Driver.java
new file mode 100644
index 0000000..b40f1ec
--- /dev/null
+++ b/csci1913/Java/Driver.java
@@ -0,0 +1,65 @@
+// DRIVER. The MAIN method has tests for your class ZILLION. Each test has a
+// comment that shows what the test should print if your code is correct. It
+// also has the number of points you will receive if the test is successful.
+// These tests are worth a total of 25 points.
+
+class Driver
+{
+ public static void main(String[] args)
+ {
+ Zillion z = new Zillion(2);
+ System.out.println(z); // 00 2 points
+
+ z.increment();
+ System.out.println(z); // 01 2 points
+
+ z.increment();
+ System.out.println(z); // 02 2 points
+
+ z.increment();
+ z.increment();
+ z.increment();
+ z.increment();
+ z.increment();
+ z.increment();
+ z.increment();
+ z.increment();
+
+ System.out.println(z); // 10 2 points
+ z.increment();
+ System.out.println(z); // 11 2 points
+
+ z = new Zillion(4);
+ System.out.println(z); // 0000 2 points
+
+ for (int j = 1; j <= 999; j += 1)
+ {
+ z.increment();
+ }
+ System.out.println(z); // 0999 2 points
+
+ z.increment();
+ System.out.println(z); // 1000 2 points
+
+ for (int j = 1; j <= 999; j += 1)
+ {
+ z.increment();
+ }
+ System.out.println(z); // 1999 2 points
+
+ z.increment();
+ System.out.println(z); // 2000 2 points
+
+ for (int j = 1; j <= 7999; j += 1)
+ {
+ z.increment();
+ }
+ System.out.println(z); // 9999 2 points
+
+ z.increment();
+ System.out.println(z); // 0000 2 points
+
+ z.increment();
+ System.out.println(z); // 0001 1 point
+ }
+}