Java模拟禅道的团队任务分配管理系统

项目功能结构如下:

 该系统需要实现以下功能:

软件启动时,首先进入登录界面进行注册和登录功能。
当登陆成功后,进入菜单,首先就可以对开发人员账户和密码进行修改。
然后可以对开发人员进行增删改操作
人员添加成功后,根据菜单提示,基于现有的公司成员,组建一个开发团队以开发一个新的项目。
组建过程包括将成员插入到团队中,或从团队中删除某成员,还可以列出团队中现有成员的列表,开发团队成员包括架构师、设计师和程序员。
团队组建成功,则可以进入项目模块,添加项目,分配开发团队进行开发。

由三个模块组成,分别是:

1、com.team.view:主控模块,负责菜单的显示和处理用户操作

2、com.team.service:模块为实体对象(Employee及其子类如程序员等)的管理模块

3、com.team.domain模块:为Employee及其子类等JavaBean类所在的包

各模块包含的类如下图:

 其中主要类的代码:

domain:

Programmer类:

package com.team.domain;

public class Programmer extends Empl{
    private int memberid;
    private boolean status=true;
    private Equipment equipment;

    public Programmer() {
    }

    public Programmer(int id, String name, int age, double salary, Equipment equipment) {
        super(id, name, age, salary);
        this.equipment = equipment;
    }

    public int getMemberid() {
        return memberid;
    }

    public void setMemberid(int memberid) {
        this.memberid = memberid;
    }

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public Equipment getEquipment() {
        return equipment;
    }

    public void setEquipment(Equipment equipment) {
        this.equipment = equipment;
    }

    public static String getPosition(Programmer e){
        String position="";

        if (e instanceof Architect){
            position="架构师";
        }else if (e instanceof Designer) {
            position="设计师";
        }else {
            position="程序员";
        }
        return position;
    }

    public String getMemberDetails(){
        return memberid+"/"+getDetails();
    }

    public String getDetailsForTeam(){
        return getMemberDetails()+"\t程序员\t";
    }

    @Override
    public String getDescription() {
        return equipment.getDescription();
    }

    @Override
    public String toString() {
        return getDetails()+"\t程序员\t"+status+"\t\t\t\t\t"+equipment.getDescription();
    }
}

Project类:

package com.team.domain;

import java.util.ArrayList;

public class Project {
    private int proId;
    private String proName;
    private String proDes;
    private ArrayList<Project> team;
    private String teamName;
    private boolean proStatus=false;


    public Project() {
    }

    public Project(int proId, String proName, String proDes, ArrayList<Project> team, String teamName, boolean proStatus) {
        this.proId = proId;
        this.proName = proName;
        this.proDes = proDes;
        this.team = team;
        this.teamName = teamName;
        this.proStatus = proStatus;
    }

    public int getProId() {
        return proId;
    }

    public void setProId(int proId) {
        this.proId = proId;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public String getProDes() {
        return proDes;
    }

    public void setProDes(String proDes) {
        this.proDes = proDes;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public boolean getProStatus() {
        return proStatus;
    }

    public void setProStatus(boolean proStatus) {
        this.proStatus = proStatus;
    }

    @Override
    public String toString() {
        return proId+"\t"+proName+"\t"+proStatus+"\t"+proDes+"\t\t"+teamName;
    }
}

Printer类:

package com.team.domain;
import com.team.view.TSUtility;

public class Printer implements Equipment{
    private String type;
    private String model;

    public Printer() {
    }

    public Printer(String type, String model) {
        this.type = type;
        this.model = model;
    }

    public String  getPrice() {
        return type;
    }

    public void setPrice(String type) {
        this.type = Printer.this.type;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public static Printer addPrinter(){
        System.out.println("请输入需要配置的打印机的型号:");
        String model=TSUtility.readKeyBoard(10, false);
        System.out.println("请输入需要配置的打印机的类型:");
        String type=TSUtility.readKeyBoard(5,false);
        System.out.println("设备添加成功!");
        return new Printer(type,model);
    }

    @Override
    public String getDescription() {
        return type+"("+model+")";
    }
}

service:

NameListService类:

package com.team.service;

import com.team.domain.*;
import com.team.view.TSUtility;

import java.util.ArrayList;

public class NameListService {
    private static ArrayList<Employee> employees=new ArrayList<Employee>();
    private int id=1;

    {
        employees.add(new Empl(id, "马云 ", 22, 3000));
        employees.add(new Architect(++id, "马化腾", 32, 18000, new NoteBook(6000, "联想T4"), 60000, 5000));
        employees.add(new Programmer(++id, "李彦宏", 23, 7000, new PC("NEC 17寸", "戴尔")));
        employees.add(new Programmer(++id, "刘强东", 24, 7300, new PC("三星 17寸","戴尔" )));
        employees.add(new Designer(++id, "雷军 ", 50, 10000, new Printer("激光", "佳能2900"), 5000));
        employees.add(new Programmer(++id, "任志强", 30, 16800, new PC("华硕", "三星 17寸")));
        employees.add(new Designer(++id, "柳传志", 45, 35500, new PC("华硕", "三星 17寸"), 8000));
        employees.add(new Architect(++id, "杨元庆", 35, 6500, new Printer("针式", "爱普生20k"), 15500, 1200));
        employees.add(new Designer(++id, "史玉柱", 27, 7800, new NoteBook(5800, "惠普m6"), 1500));
        employees.add(new Programmer(++id, "丁磊 ", 26, 6600, new PC("戴尔", "NEC17寸")));
        employees.add(new Programmer(++id, "张朝阳 ", 35, 7100, new PC("华硕", "三星 17寸")));
        employees.add(new Designer(++id, "杨致远", 38, 9600, new NoteBook(5800, "惠普m6"), 3000));
    }

    public NameListService() {
    }

    public NameListService(ArrayList<Employee> employees) {
        this.employees = employees;
    }

    public static ArrayList<Employee> getAllEmployees(){
        return employees;
    }

    public Employee getEmployee(int id) throws TeamException {
        for (int i = 0; i < employees.size(); i++) {
            if (employees.get(i).getId()==id){
                return employees.get(i);
            }
        }
        throw new TeamException("该员工不存在");
    }

    public void addEmployee(){
        System.out.println("请输入新员工的职位编号:");
        System.out.println("1(无职位),2(程序员),3(设计师),4(架构师)");
        char professionNum= TSUtility.readMenuSelection1(
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值