diff --git a/app/src/main/java/hatelace/Word.java b/app/src/main/java/hatelace/Word.java index db74dbc..4ac199f 100644 --- a/app/src/main/java/hatelace/Word.java +++ b/app/src/main/java/hatelace/Word.java @@ -1,11 +1,11 @@ package hatelace; -public abstract class Word { - public abstract T getValue(); - public abstract Word add(Word other); - public abstract Word subtract(Word other); - public abstract Word multiply(Word other); - public abstract Word divide(Word other); - public abstract String toString(); - public abstract boolean equals(Object other); +public interface Word { + T getValue(); + Word add(Word other); + Word subtract(Word other); + Word multiply(Word other); + Word divide(Word other); + String toString(); + boolean equals(Object other); } diff --git a/app/src/main/java/hatelace/memtypes/IntWord.java b/app/src/main/java/hatelace/memtypes/IntWord.java index 75c00a8..eea0583 100644 --- a/app/src/main/java/hatelace/memtypes/IntWord.java +++ b/app/src/main/java/hatelace/memtypes/IntWord.java @@ -2,7 +2,7 @@ package hatelace.memtypes; import hatelace.Word; -public class IntWord extends Word { +public class IntWord implements Word { private Integer value; public IntWord(Integer value) { diff --git a/app/src/main/java/hatelace/memtypes/LongWord.java b/app/src/main/java/hatelace/memtypes/LongWord.java index f01ace2..adb8855 100644 --- a/app/src/main/java/hatelace/memtypes/LongWord.java +++ b/app/src/main/java/hatelace/memtypes/LongWord.java @@ -2,7 +2,7 @@ package hatelace.memtypes; import hatelace.Word; -public class LongWord extends Word { +public class LongWord implements Word { private Long value; public LongWord(Long value) {