Update PolygonFactory.java (#3108)

This commit is contained in:
Grzegorz Piwowarek 2017-11-29 12:10:22 +01:00 committed by GitHub
parent 3feaee499a
commit fb8f07c852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ public class PolygonFactory {
if(numberOfSides == 5) { if(numberOfSides == 5) {
return new Pentagon(); return new Pentagon();
} }
if(numberOfSides == 4) { if(numberOfSides == 7) {
return new Heptagon(); return new Heptagon();
} }
else if(numberOfSides == 8) { else if(numberOfSides == 8) {
@ -19,4 +19,4 @@ public class PolygonFactory {
} }
return null; return null;
} }
} }