Advertisement
Guest User

JAVA CODE SHUVO

a guest
Oct 22nd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public class Mobile{
  2.  
  3. private double simnumber;
  4. private String customerName;
  5. private double balance;
  6. private double callRate;
  7.  
  8.  
  9. public Mobile(String customerName,double balance,double callRate){
  10.  
  11. this.customerName=customerName;
  12. this.balance=balance;
  13. this.callRate=callRate;
  14.  
  15.  
  16.  
  17. }
  18.  
  19. private Mobile( double simnumber)
  20. {
  21. this.simnumber=simnumber;
  22.  
  23.  
  24.  
  25.  
  26. }
  27. public void call(Mobile m1){
  28.  
  29. System.out.println(m1);
  30.  
  31.  
  32.  
  33. }
  34. public void display()
  35. {
  36. System.out.println(simnumber+customerName+balance+callRate);
  37.  
  38.  
  39.  
  40. }
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement