Update PolygonFactory.java (#3108)
This commit is contained in:
parent
3feaee499a
commit
fb8f07c852
|
@ -11,7 +11,7 @@ public class PolygonFactory {
|
|||
if(numberOfSides == 5) {
|
||||
return new Pentagon();
|
||||
}
|
||||
if(numberOfSides == 4) {
|
||||
if(numberOfSides == 7) {
|
||||
return new Heptagon();
|
||||
}
|
||||
else if(numberOfSides == 8) {
|
||||
|
@ -19,4 +19,4 @@ public class PolygonFactory {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue