{{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:

Generate Models from SQL Server using Entity Framework Core

To generate models from SQL Server database tables using Entity Framework (EF) in .NET, you can follow the Database-First approach with Ent...