3x5w4rup

Person

Apr 19th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. // Super Class
  2. public class Person {
  3.     protected String name;
  4.     protected String address;
  5.     protected String phoneNumber;
  6.     protected String emailAddress;
  7.    
  8.     public Person(){
  9.         name = null;
  10.         address = null;
  11.         phoneNumber = null;
  12.         emailAddress = null;
  13.     }
  14.    
  15.     public Person(String name,String address,String phoneNumber,String emailAddress){
  16.         this.name = name;
  17.         this.address = address;
  18.         this.phoneNumber = phoneNumber;
  19.         this.emailAddress = emailAddress;
  20.     }
  21.    
  22.     public String toString(){
  23.         return "Class Name : Person, Person Name : " + name;
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment