{{theTime}}

Search This Blog

Total Pageviews

Factory Method Design Pattern Java Implementation

    interface JavaCertification {

        public JavaCertification getCertificate() ;

    }
    class OCJPCertification implements JavaCertification {     
        public JavaCertification getCertificate(){         
            return new OCJPCertification() ;
        }
    }

    class OCWCDCertification implements JavaCertification {     
        public JavaCertification getCertificate(){         
            return new OCWCDCertification() ;
        }
    }

    class CertificationBuilder {

        public CertificationBuilder() {}

        public JavaCertification getCertifcate(String certificate){         
            if(certificate.equalsIgnoreCase("OCJP")){
                return new OCJPCertification() ;
            }else if(certificate.equalsIgnoreCase("OCWCD")){
                return new OCWCDCertification() ;
            }
            return null ;
        }
    }


No comments:

gradlew : The term 'gradlew' is not recognized as the name of a cmdlet, function, script file , or operable program

The command gradlew was not found, but does exist in the current location.  Windows PowerShell does not load commands from the current locat...