Exemplo n.º 1
0
  /** gathers a string from all the other classes and prints the message out to the console */
  public void printOutMessage() {

    String toPrint =
        ant11.getMessage()
            + ant12.getMessage()
            + ant21.getMessage()
            + ant22.getMessage()
            + ant31.getMessage();
    // Person1 replace P1 with your name
    // and gburdell1 with your gt id
    Person1 p1 = new Person1("Andie Rocca");
    toPrint += p1.toString("arocca3");
    // Person2 replace P2 with your name
    // and gburdell with your gt id
    Person2 p2 = new Person2("Tai Tran");
    toPrint += p2.toString("ttran95");
    // Person3 replace P3 with your name
    // and gburdell3 with your gt id
    Person3 p3 = new Person3("John Blum");
    toPrint += p3.toString("jblum7");
    // Person4 replace P4 with your name
    // and gburdell4 with your gt id
    Person4 p4 = new Person4("Reza");
    toPrint += p4.toString("rkalantari6");
    // Person5 replace P4 with your name
    // and gburdell5 with your gt id
    Person5 p5 = new Person5("HassenH");
    toPrint += p5.toString("hhussen3");

    System.out.println(toPrint);
  }
  /** gathers a string from all the other classes and prints the message out to the console */
  public void printOutMessage() {

    String toPrint =
        ant11.getMessage()
            + ant12.getMessage()
            + ant21.getMessage()
            + ant22.getMessage()
            + ant31.getMessage();
    // Person1 replace P1 with your name
    // and ggg000x with your gt num
    Person1 p1 = new Person1("Andrew Wilder");
    toPrint += p1.toString("902588570");
    // Person2 replace P2 with your name
    // and ggg000x with your gt num
    Person2 p2 = new Person2("Bobbey Reese");
    toPrint += p2.toString("902705944");
    // Person3 replace P3 with your name
    // and ggg000x with your gt num
    Person3 p3 = new Person3("Ivory Assan");
    toPrint += p3.toString("902636104");
    // Person4 replace P4 with your name
    // and ggg000x with your gt num
    Person4 p4 = new Person4("Mykal Thomas");
    toPrint += p4.toString("902767030");
    // Person5 replace P5 with your name
    // and ggg000x with your gt num
    Person5 p5 = new Person5("Mark McDonald");
    toPrint += p5.toString("902601496");
    System.out.println(toPrint);
  }
Exemplo n.º 3
0
  /** gathers a string from all the other classes and prints the message out to the console */
  public void printOutMessage() {

    String toPrint =
        ant11.getMessage()
            + ant12.getMessage()
            + ant21.getMessage()
            + ant22.getMessage()
            + ant31.getMessage();
    // Person1 replace P1 with your name
    // and ggg000x with your gt num
    Person1 p1 = new Person1("Shawn Chaudhry");
    toPrint += p1.toString("schaudhry31");
    // Person2 replace P2 with your name
    // and ggg000x with your gt num
    Person2 p2 = new Person2("Vraj Patel");
    toPrint += p2.toString("vpatel45");
    // Person3 replace P3 with your name
    // and ggg000x with your gt num
    Person3 p3 = new Person3("Spencer Applegate");
    toPrint += p3.toString("sapplegate3");
    // Person4 replace P4 with your name
    // and ggg000x with your gt num
    Person4 p4 = new Person4("Derrek Keyser");
    toPrint += p4.toString("dkeyser3");
    // Person5 replace P5 with your name
    // and ggg000x with your gt num
    Person5 p5 = new Person5("P5");
    toPrint += p5.toString("ggg005x");
    System.out.println(toPrint);
  }