commit 84843d65b480c5d43d1f0ffb833c4924b731fdb4 Author: Matt Huntington Date: Thu Oct 22 14:30:22 2026 -0400 code diff --git a/Bird.class b/Bird.class new file mode 100644 index 0000000..17a7da1 Binary files /dev/null and b/Bird.class differ diff --git a/Bird.java b/Bird.java new file mode 100644 index 0000000..ba5f8c1 --- /dev/null +++ b/Bird.java @@ -0,0 +1,3 @@ +interface Bird { + void fly(); +} diff --git a/Car.class b/Car.class new file mode 100644 index 0000000..5358442 Binary files /dev/null and b/Car.class differ diff --git a/Car.java b/Car.java new file mode 100644 index 0000000..bb34c90 --- /dev/null +++ b/Car.java @@ -0,0 +1,6 @@ +abstract class Car { + abstract void drive(); + void stop(){ + System.out.println("screeeeech"); + } +} diff --git a/HelloWorld.class b/HelloWorld.class new file mode 100644 index 0000000..406488e Binary files /dev/null and b/HelloWorld.class differ diff --git a/HelloWorld.java b/HelloWorld.java new file mode 100644 index 0000000..03838bf --- /dev/null +++ b/HelloWorld.java @@ -0,0 +1,63 @@ +class HelloWorld{ + + void printMessage() { + System.out.println("Hi"); + } + + int add(int a, int b){ + return a + b; + } + + void main(String[] args){ + + //System.out.println("Hello, Matt"); + + String greeting = "Hello there!"; + + int myAge = 46; + int myNewAge = myAge + 2; + double myWeight = 144.5; + //System.out.println(myWeight); + + Boolean isCool = false; + if(isCool){ + //System.out.println("Welcome to the party"); + } else { + //System.out.println("Get lost dweeeeeeb"); + } + + while(myAge < 50){ + //System.out.println(myAge); + myAge++; + } + + for(int i = 0; i < 5; i++){ + //System.out.println(i); + } + + String[] cars = {"Volvo", "Toyota", "Mazda"}; + //System.out.println(cars[1]); + + //printMessage(); + + int result = add(4, 2); + //System.out.println(result); + + Human matt = new Human("Matthew"); + System.out.println(matt.name); + + SuperHuman superman = new SuperHuman("Clark", "flight"); + superman.name = "bilbo"; + System.out.println(superman.name); + //superman.power = "burping"; + System.out.println(superman.getPower()); + + Sedan myCar = new Sedan(); + myCar.drive(); + myCar.stop(); + + Swallow stewart = new Swallow(); + stewart.fly(); + } + +} diff --git a/Human.class b/Human.class new file mode 100644 index 0000000..77b51a1 Binary files /dev/null and b/Human.class differ diff --git a/Human.java b/Human.java new file mode 100644 index 0000000..6362964 --- /dev/null +++ b/Human.java @@ -0,0 +1,6 @@ +class Human { + String name; + Human(String name){ + this.name = name; + } +} diff --git a/Sedan.class b/Sedan.class new file mode 100644 index 0000000..4443f4b Binary files /dev/null and b/Sedan.class differ diff --git a/Sedan.java b/Sedan.java new file mode 100644 index 0000000..2c28857 --- /dev/null +++ b/Sedan.java @@ -0,0 +1,5 @@ +class Sedan extends Car{ + void drive(){ + System.out.println("vroom"); + } +} diff --git a/SuperHuman.class b/SuperHuman.class new file mode 100644 index 0000000..99c2d2e Binary files /dev/null and b/SuperHuman.class differ diff --git a/SuperHuman.java b/SuperHuman.java new file mode 100644 index 0000000..078f07b --- /dev/null +++ b/SuperHuman.java @@ -0,0 +1,10 @@ +class SuperHuman extends Human { + private String power; + SuperHuman(String name, String power){ + super(name); + this.power = power; + } + public String getPower(){ + return this.power; + } +} diff --git a/Swallow.class b/Swallow.class new file mode 100644 index 0000000..b8cc053 Binary files /dev/null and b/Swallow.class differ diff --git a/Swallow.java b/Swallow.java new file mode 100644 index 0000000..fafc177 --- /dev/null +++ b/Swallow.java @@ -0,0 +1,5 @@ +class Swallow implements Bird { + public void fly() { + System.out.println("sweeeee"); + } +}