예제 #1
0
  public static void main(String[] args) {
    StartUp stp = new StartUp();

    Member m1 = new Member("Alex");
    Member m2 = new Member("Beni");
    Member m3 = new Member("Cakra");
    Member m4 = new Member("Deni");
    Member m5 = new Member("Eric");
    stp.addMember(m1);
    stp.addMember(m2);
    stp.addMember(m3);
    stp.addMember(m4);
    stp.addMember(m5);

    stp.createNewProject("project1");
    stp.createNewProject("project2");

    Project p = stp.getProject(0);
    Member m = stp.getMember(0);
    stp.setProjectMember(p, m);

    p = stp.getProject(0);
    m = stp.getMember(1);
    stp.setProjectMember(p, m);

    p = stp.getProject(0);
    m = stp.getMember(3);
    stp.setProjectMember(p, m);

    p = stp.getProject(1);
    m = stp.getMember(1);
    stp.setProjectMember(p, m);

    p = stp.getProject(1);
    m = stp.getMember(2);
    stp.setProjectMember(p, m);

    p = stp.getProject(1);
    m = stp.getMember(3);
    stp.setProjectMember(p, m);

    p = stp.getProject(1);
    m = stp.getMember(4);
    stp.setProjectMember(p, m);

    stp.releaseProject(stp.getProject(1));

    System.out.println(stp.getMember(0).toString());
    System.out.println(stp.getMember(1).toString());
    System.out.println(stp.getMember(2).toString());
    System.out.println(stp.getMember(3).toString());
    System.out.println(stp.getMember(4).toString());

    System.out.println(stp.getProject(0).toString());
    System.out.println(stp.getProject(1).toString());

    System.out.println("Number of released project: " + stp.getNumReleasedProject());
  }
예제 #2
0
  public static void main(String[] args) {
    StartUp stp = new StartUp();

    Member m1 = new Member("Alex");
    stp.addMember(m1);
    Member m2 = new Member("Beni");
    stp.addMember(m2);
    Member m3 = new Member("Cakra");
    stp.addMember(m3);
    Member m4 = new Member("Deni");
    stp.addMember(m4);
    Member m5 = new Member("Eric");
    stp.addMember(m5);

    stp.createNewProject("project1");
    stp.createNewProject("project2");

    Project p1 = stp.getProject(0);
    Project p2 = stp.getProject(1);
    Member m11 = stp.getMember(0);
    Member m22 = stp.getMember(1);
    Member m33 = stp.getMember(2);
    Member m44 = stp.getMember(3);
    Member m55 = stp.getMember(4);
    stp.setProjectMember(p1, m11);
    stp.setProjectMember(p1, m22);
    stp.setProjectMember(p1, m44);
    stp.setProjectMember(p1, m33);
    stp.setProjectMember(p1, m55);

    stp.releaseProject(stp.getProject(1));

    stp.getNumReleasedProject();
  }