summary refs log tree commit diff stats
path: root/java/output
diff options
context:
space:
mode:
Diffstat (limited to 'java/output')
-rw-r--r--java/output/AbstractShapeCalculations.typ19
-rw-r--r--java/output/CircularBaseExample.typ17
-rw-r--r--java/output/CustomExceptionExample.typ13
-rw-r--r--java/output/InnerClassExample.typ8
-rw-r--r--java/output/InterfaceExample.typ11
-rw-r--r--java/output/PackageExample.typ8
-rw-r--r--java/output/PackageInterfaceExample.typ8
-rw-r--r--java/output/RuntimePolymorphismExample.typ9
-rw-r--r--java/output/Template.typ4
-rw-r--r--java/output/ThreadsExample.typ73
10 files changed, 170 insertions, 0 deletions
diff --git a/java/output/AbstractShapeCalculations.typ b/java/output/AbstractShapeCalculations.typ
new file mode 100644
index 0000000..c893f73
--- /dev/null
+++ b/java/output/AbstractShapeCalculations.typ
@@ -0,0 +1,19 @@
+#import "/template.typ": highlight-output
+#highlight-output[```
+$ java AbstractShapeCalculations
+Calculate and display shapes
+
+Rectangle
+  Enter length: 12
+  Enter width: 8
+A rectangle with length 12.0 units and width 8.0 units has the area of 96.0 square units.
+
+Circle
+  Enter radius: 9
+A circle with radius 9.0 units has the area of 254.46900494077323 square units.
+
+Triangle
+  Enter three side lengths: 5 12 13
+A triangle with side lengths 5.0 units, 12.0 units and 13.0 units has the area of 30.0 square units.
+```]
+
diff --git a/java/output/CircularBaseExample.typ b/java/output/CircularBaseExample.typ
new file mode 100644
index 0000000..03769ae
--- /dev/null
+++ b/java/output/CircularBaseExample.typ
@@ -0,0 +1,17 @@
+#import "/template.typ": highlight-output
+#highlight-output[```
+$ java CircularBaseExample
+Enter radius of Cone: 5
+Enter height of Cone: 8
+Enter radius of Cylinder: 7
+Enter height of Cylinder: 6
+
+Cone base area: 78.53981633974483
+Cone total area: 204.20352248333654
+Cone volume: 209.43951023931953
+
+Cylinder base area: 153.93804002589985
+Cylinder total area: 571.7698629533423
+Cylinder volume: 923.6282401553991
+```]
+
diff --git a/java/output/CustomExceptionExample.typ b/java/output/CustomExceptionExample.typ
new file mode 100644
index 0000000..1e15b79
--- /dev/null
+++ b/java/output/CustomExceptionExample.typ
@@ -0,0 +1,13 @@
+#import "/template.typ": highlight-output
+#highlight-output[```
+$ java CustomExceptionExample
+Enter an integer: 23
+You entered: 23
+$ java CustomExceptionExample
+Enter an integer: -4
+Number cannot be less than zero
+$ java CustomExceptionExample
+Enter an integer: abc
+Input must be an integer.
+```]
+
diff --git a/java/output/InnerClassExample.typ b/java/output/InnerClassExample.typ
new file mode 100644
index 0000000..9c1abb1
--- /dev/null
+++ b/java/output/InnerClassExample.typ
@@ -0,0 +1,8 @@
+#import "/template.typ": highlight-output
+#highlight-output[```
+$ java InnerClassExample
+Outer member: 10
+Inner member: 20
+Inner member (through object): 20
+```]
+
diff --git a/java/output/InterfaceExample.typ b/java/output/InterfaceExample.typ
new file mode 100644
index 0000000..4d2958b
--- /dev/null
+++ b/java/output/InterfaceExample.typ
@@ -0,0 +1,11 @@
+#import "/template.typ": highlight-output
+#highlight-output[```
+$ java InterfaceExample
+Implementation of method1
+Implementation of method2
+Implementation of method3
+Implementation of method4
+Implementation of newMethod
+Concrete method in the concrete class
+```]
+
diff --git a/java/output/PackageExample.typ b/java/output/PackageExample.typ
new file mode 100644
index 0000000..d80d8ab
--- /dev/null
+++ b/java/output/PackageExample.typ
@@ -0,0 +1,8 @@
+#import "/template.typ": highlight-output
+#highlight-output[```
+$ java PackageExample
+MethodTwo in ClassTwo
+Variable from ClassOne: 10
+From methodOne in ClassOne
+```]
+
diff --git a/java/output/PackageInterfaceExample.typ b/java/output/PackageInterfaceExample.typ
new file mode 100644
index 0000000..37a528d
--- /dev/null
+++ b/java/output/PackageInterfaceExample.typ
@@ -0,0 +1,8 @@
+#import "/template.typ": highlight-output
+#highlight-output[```
+$ java PackageInterfaceExample
+Implementation of methodOne
+Implementation of methodTwo
+Implementation of methodThree
+```]
+
diff --git a/java/output/RuntimePolymorphismExample.typ b/java/output/RuntimePolymorphismExample.typ
new file mode 100644
index 0000000..132ff7f
--- /dev/null
+++ b/java/output/RuntimePolymorphismExample.typ
@@ -0,0 +1,9 @@
+#import "/template.typ": highlight-output
+#highlight-output[```
+$ java RuntimePolymorphismExample
+Drawing a Circle
+Drawing a Square
+Calculating Circle Area
+Calculating Square Area
+```]
+
diff --git a/java/output/Template.typ b/java/output/Template.typ
new file mode 100644
index 0000000..c1fa1d4
--- /dev/null
+++ b/java/output/Template.typ
@@ -0,0 +1,4 @@
+#import "/template.typ": highlight-output
+#highlight-output[```
+```]
+
diff --git a/java/output/ThreadsExample.typ b/java/output/ThreadsExample.typ
new file mode 100644
index 0000000..b6dbc81
--- /dev/null
+++ b/java/output/ThreadsExample.typ
@@ -0,0 +1,73 @@
+#import "/template.typ": highlight-output
+#v(0.8em)
+#columns(2)[
+#highlight-output[```
+$ java ThreadsExample
+Subclass Thread 13 - Tick 1
+Subclass Thread 13 - Tick 2
+Subclass Thread 13 - Tick 3
+Subclass Thread 13 - Tick 4
+Subclass Thread 13 - Tick 5
+```]
+#highlight-output[```
+Subclass Thread 13 - Tick 6
+Subclass Thread 13 - Tick 7
+Subclass Thread 13 - Tick 8
+Subclass Thread 13 - Tick 9
+Subclass Thread 13 - Tick 10
+Runnable Thread 18 - Tick 1
+```]
+#highlight-output[```
+Subclass Thread 14 - Tick 1
+Runnable Thread 18 - Tick 2
+Runnable Thread 17 - Tick 1
+Subclass Thread 14 - Tick 2
+Runnable Thread 17 - Tick 2
+Runnable Thread 16 - Tick 1
+Subclass Thread 15 - Tick 1
+Runnable Thread 16 - Tick 2
+Runnable Thread 17 - Tick 3
+Runnable Thread 17 - Tick 4
+Runnable Thread 17 - Tick 5
+Runnable Thread 17 - Tick 6
+Runnable Thread 17 - Tick 7
+Runnable Thread 17 - Tick 8
+Runnable Thread 17 - Tick 9
+Runnable Thread 17 - Tick 10
+Subclass Thread 14 - Tick 3
+Runnable Thread 18 - Tick 3
+Runnable Thread 16 - Tick 3
+Subclass Thread 14 - Tick 4
+Subclass Thread 14 - Tick 5
+Subclass Thread 14 - Tick 6
+Subclass Thread 14 - Tick 7
+Subclass Thread 14 - Tick 8
+Subclass Thread 14 - Tick 9
+```]
+#colbreak()
+#highlight-output[```
+Subclass Thread 14 - Tick 10
+Runnable Thread 16 - Tick 4
+Runnable Thread 16 - Tick 5
+Runnable Thread 16 - Tick 6
+Subclass Thread 15 - Tick 2
+Runnable Thread 16 - Tick 7
+Runnable Thread 18 - Tick 4
+Runnable Thread 18 - Tick 5
+Runnable Thread 18 - Tick 6
+Runnable Thread 18 - Tick 7
+Runnable Thread 18 - Tick 8
+Runnable Thread 16 - Tick 8
+Subclass Thread 15 - Tick 3
+Runnable Thread 16 - Tick 9
+Subclass Thread 15 - Tick 4
+Runnable Thread 18 - Tick 9
+Subclass Thread 15 - Tick 5
+Runnable Thread 16 - Tick 10
+Subclass Thread 15 - Tick 6
+Subclass Thread 15 - Tick 7
+Subclass Thread 15 - Tick 8
+Subclass Thread 15 - Tick 9
+Subclass Thread 15 - Tick 10
+Runnable Thread 18 - Tick 10
+```]]