aboutsummaryrefslogtreecommitdiff
path: root/sem5/oop/m1/src/Main.java
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-09-03 10:21:33 +0200
committerJulian T <julian@jtle.dk>2020-09-03 10:21:33 +0200
commitb64f5e9e206ba1f9254199a48bbec1846201d0ae (patch)
treeb7dde25371571dddebf523afb4e723c8f9b0bc1d /sem5/oop/m1/src/Main.java
parent0e3cafc48570e4b675ecac11663a5f777b24d339 (diff)
Added first oop assignment
Diffstat (limited to 'sem5/oop/m1/src/Main.java')
-rw-r--r--sem5/oop/m1/src/Main.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/sem5/oop/m1/src/Main.java b/sem5/oop/m1/src/Main.java
new file mode 100644
index 0000000..4ccb5a4
--- /dev/null
+++ b/sem5/oop/m1/src/Main.java
@@ -0,0 +1,14 @@
+
+public class Main {
+ public static void main(String[] args) {
+ Student std = new Student("Julian", (short)21, "Male", (long)123213213, "COMTEK");
+ Uniperson hej = std;
+
+ hej.addGPA(0.32);
+ hej.addGPA(12);
+
+ System.out.printf("deg: %s, sem: %d, avg: %f\n", hej.getDeg(), hej.getSem(), hej.avgGPA());
+
+ System.out.printf("person: %s\n", std);
+ }
+}