Advertisement
Guest User

Phone

a guest
Mar 24th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Phone {
  2.     public String nama;
  3.     public String os;
  4.     public int memory;
  5.     public int price;
  6.    
  7.     public Phone(String nama, String os, int memory, int price){
  8.         this.nama = nama;
  9.         this.os = os;
  10.         this.memory = memory;
  11.         this.price = price;
  12.     }
  13.  
  14.     public int getPrice() {
  15.         return price;
  16.     }
  17.  
  18.     public void setPrice(int price) {
  19.         this.price = price;
  20.     }
  21.  
  22.     public String getNama() {
  23.         return nama;
  24.     }
  25.  
  26.     public void setNama(String nama) {
  27.         this.nama = nama;
  28.     }
  29.  
  30.     public String getOs() {
  31.         return os;
  32.     }
  33.  
  34.     public void setOs(String os) {
  35.         this.os = os;
  36.     }
  37.  
  38.     public int getMemory() {
  39.         return memory;
  40.     }
  41.  
  42.     public void setMemory(int memory) {
  43.         this.memory = memory;
  44.     }
  45.    
  46.    
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement