Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package PhoneCall;
- class Call {
- private static float priceForAMinute = 0.20f;
- private String caller; // the number from which we call;
- private String receiver; // the number we are calling to;
- private int duration; // the length of the call in minutes;
- Call (String caller, String receiver, int duration){
- this.caller = caller;
- this.receiver = receiver;
- this.duration = duration;
- }
- public String getCaller() {
- return caller;
- }
- public String getReceiver() {
- return receiver;
- }
- public int getDuration() {
- return duration;
- }
- public static double getPriceForAMinute() {
- return priceForAMinute;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement