Promi_38

Recipient

Dec 7th, 2021
689
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Recipient {
  2.  
  3.     String name;
  4.     String contactNumber;
  5.     String email;
  6.     Address address;
  7.  
  8.     Recipient(String name, String contactNumber, String email, Address address) {
  9.         this.name = name;
  10.         this.contactNumber = contactNumber;
  11.         this.email = email;
  12.         this.address = address;
  13.     }
  14.  
  15.     public void getRecipient() {
  16.         System.out.print("Recipient Name : " + this.name + "\n"
  17.                 + "Contact Number : " + this.contactNumber + "\n"
  18.                 + "Email          : " + this.email + "\n\n\n"
  19.                 + "      ---- ADDRESS ---- \n\n");
  20.         address.getAddress();
  21.     }
  22. }
  23.  
RAW Paste Data