Advertisement
andersonalmada

Untitled

Jul 1st, 2022
888
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1. package br.ufc.mandacaru.model;
  2.  
  3. public class Person {
  4.  
  5.     private int id;
  6.     private String name;
  7.     private Address address;
  8.  
  9.     public Person() {
  10.  
  11.     }
  12.  
  13.     public Person(int id, String name, Address address) {
  14.         super();
  15.         this.id = id;
  16.         this.name = name;
  17.         this.address = address;
  18.     }
  19.  
  20.     public int getId() {
  21.         return id;
  22.     }
  23.  
  24.     public void setId(int id) {
  25.         this.id = id;
  26.     }
  27.  
  28.     public String getName() {
  29.         return name;
  30.     }
  31.  
  32.     public void setName(String name) {
  33.         this.name = name;
  34.     }
  35.  
  36.     public Address getAddress() {
  37.         return address;
  38.     }
  39.  
  40.     public void setAddress(Address address) {
  41.         this.address = address;
  42.     }
  43.  
  44.     @Override
  45.     public String toString() {
  46.         return "Person [id=" + id + ", name=" + name + ", address=" + address + "]";
  47.     }
  48. }
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement