/** 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);
  }
 public void findObj4(long ssn) {
   EntityManager em = emf.createEntityManager();
   Person2 p = em.find(Person2.class, ssn);
   Person2 p1 = p.getMedical().getPatient();
   assertEquals(p1, p);
   em.close();
 }
Exemple #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 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);
  }
Exemple #4
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);
  }
  public Person2 createPerson2(EntityManager em, int id) {
    Person2 p = new Person2();
    p.setName("p_" + id);

    MedicalHistory2 m = createMedicalHistory2(em, mId2++);
    m.setPatient(p); // automatically set the id
    p.setMedical(m);
    em.persist(m);
    medicals2.put(m.getName(), m);

    em.persist(p);
    persons2.put(p.getName(), p);
    return p;
  }
Exemple #6
0
  public void testPerson2() throws Exception {
    char[] text;
    AttributesImpl attributes = new AttributesImpl();
    handler.startElement(null, null, "person2", attributes);
    handler.characters(text = toCharArray("I WILL DO WHAT YOU SAY"), 0, text.length);
    handler.endElement(null, null, "person2");

    Person2 expected = new Person2("I WILL DO WHAT YOU SAY");
    Person2 actual = (Person2) stack.peek();
    assertEquals(expected, actual);

    Person2 differs = new Person2("I WILL DO SOMETHING ELSE");
    assertFalse(differs.equals(actual));
  }
  Object createPerson2(int id, String name, int valFld) {
    if (!isBinaryMarshaller()) {
      Person2 p = new Person2(id);
      p.name = name;
      p.IntVal = valFld;

      return p;
    } else {
      BinaryObjectBuilder o = grid(0).binary().builder("Person2");
      o.setField("id", id);
      o.setField("name", name);
      o.setField("IntVal", valFld);

      return o.build();
    }
  }
Exemple #8
0
 public static void main(String[] args) {
   Person2 p = new Person2();
   p.name = "小强";
   p.show();
 }