mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-20 05:27:15 +00:00
fix must override a superclass method (#919)
* fix must override a superclass method * fix must override a superclass method
This commit is contained in:
committed by
Ilkka Seppälä
parent
35dc25d480
commit
c653edf38f
@@ -29,14 +29,17 @@ package com.iluwatar.abstractfactory;
|
||||
*/
|
||||
public class ElfKingdomFactory implements KingdomFactory {
|
||||
|
||||
@Override
|
||||
public Castle createCastle() {
|
||||
return new ElfCastle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public King createKing() {
|
||||
return new ElfKing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Army createArmy() {
|
||||
return new ElfArmy();
|
||||
}
|
||||
|
||||
@@ -29,14 +29,17 @@ package com.iluwatar.abstractfactory;
|
||||
*/
|
||||
public class OrcKingdomFactory implements KingdomFactory {
|
||||
|
||||
@Override
|
||||
public Castle createCastle() {
|
||||
return new OrcCastle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public King createKing() {
|
||||
return new OrcKing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Army createArmy() {
|
||||
return new OrcArmy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user