Advertisement
Guest User

targil1

a guest
Nov 23rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.00 KB | None | 0 0
  1.  
  2. public class Adult {
  3.  
  4.     private String name;
  5.     private String prof;
  6.     private double height;
  7.     public Adult(){
  8.     }
  9.    
  10.     public String getName() {
  11.         return name;
  12.     }
  13.  
  14.     public void setName(String name) {
  15.         this.name = name;
  16.     }
  17.  
  18.     public String getProf() {
  19.         return prof;
  20.     }
  21.  
  22.     public void setProf(String prof) {
  23.         this.prof = prof;
  24.     }
  25.  
  26.     public double getHeight() {
  27.         return height;
  28.     }
  29.  
  30.     public void setHeight(double height) {
  31.         this.height = height;
  32.     }
  33.  
  34.     public Adult(String name,String prof,double height)
  35.     {
  36.         this.name=name;
  37.         this.prof=prof;
  38.         this.height=height;
  39.  
  40.     }
  41.     public Adult(String name,double height)
  42.     {
  43.         this.name=name;
  44.         this.height=height;
  45.     }
  46.     public Adult(Adult other){
  47.         name=other.name;
  48.         prof=other.prof;
  49.         height=other.height;
  50.     }
  51.     public void show(){
  52.         System.out.println(name %);
  53.     }
  54.    
  55.    
  56.    
  57.    
  58. }
  59. main==
  60. =========
  61.  
  62. public class Tester {
  63.  
  64.     public static void main(String[] args) {
  65.         // TODO Auto-generated method stub
  66.  
  67.     }
  68.  
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement