factory.java~4~

来自「基于mvc的宠物管理系统。servlet+jsp」· JAVA~4~ 代码 · 共 34 行

JAVA~4~
34
字号
/*工厂类*/
package com.richard.service;

import com.richard.dao.*;

public class Factory {
    public Factory() {
    }

    public static InterfaceOfEmployee createEmployee() {         //用于产生一个InterfaceOfEmployee对象
        return new ClassOfEmployee();
    }

    public static InterfaceOfOwners createOwners()//用于产生一个InterfaceOfOwners对象
    {
        return new ClassOfOwners();
    }

    public static InterfaceOfPets createPets()
    {
        return new ClassOfPets();
    }

    public static InterfaceOfViewOfPets createViewOfPets()
    {
        return new ClassOfViewOfPets();
    }

    public static InterfaceOfTypes createTypes()
    {

    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?