Java Design patterns

This commit is contained in:
Javadevjournal
2022-03-20 09:31:02 -07:00
parent aa5cb0a341
commit 3f49ebb6c0
52 changed files with 1080 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package javadevjournal.design.creational.abstractfactory;
/**
* @author Kunwar
*/
public class RoundedShapeFactory extends AbstractFactory {
@Override
public Shape getShape(String shapeType){
if(shapeType.equalsIgnoreCase("RECTANGLE")){
return new RoundedRectangle();
}else if(shapeType.equalsIgnoreCase("SQUARE")){
return new RoundedSquare();
}
return null;
}
}