Advertisement
Guest User

Call

a guest
Jan 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. package PhoneCall;
  2.  
  3. class Call {
  4.    
  5.     private static float priceForAMinute = 0.20f;
  6.     private String caller;   // the number from which we call;
  7.     private String receiver; // the number we are calling to;
  8.     private int duration; // the length of the call in minutes;
  9.    
  10.     Call (String caller, String receiver, int duration){
  11.         this.caller = caller;
  12.         this.receiver = receiver;
  13.         this.duration = duration;
  14.     }
  15.    
  16.    
  17.     public String getCaller() {
  18.         return caller;
  19.     }
  20.  
  21.  
  22.     public String getReceiver() {
  23.         return receiver;
  24.     }
  25.  
  26.  
  27.     public int getDuration() {
  28.         return duration;
  29.     }
  30.  
  31.  
  32.     public static double getPriceForAMinute() {
  33.         return priceForAMinute;
  34.     }
  35.    
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement