removed redundant makeSound sound method of abstract class Animal (#668)

* made changes to java reflection

* removed redundant method makeSound in Animal abstract class
This commit is contained in:
Egima profile 2016-09-05 13:12:30 +03:00 committed by Grzegorz Piwowarek
parent fc1bb6b7b1
commit 15dd97b485
2 changed files with 1 additions and 5 deletions

View File

@ -18,10 +18,6 @@ public abstract class Animal implements Eating {
this.name = name; this.name = name;
} }
public String makeSound() {
return getSound();
}
protected abstract String getSound(); protected abstract String getSound();
} }

View File

@ -124,7 +124,7 @@ public class ReflectionTest {
assertEquals(4, actualMethods.size()); assertEquals(4, actualMethods.size());
assertTrue(actualMethods.containsAll(Arrays.asList("getName", assertTrue(actualMethods.containsAll(Arrays.asList("getName",
"setName", "getSound", "makeSound"))); "setName", "getSound")));
} }
@Test @Test