phydaus

PremiumService

Oct 18th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. public class PremiumService extends Customer {
  2.     private double minVideoCall;
  3.     private double minVideoMail;
  4.    
  5.     public PremiumService( String name, String address, String telNo, int noOfSms,
  6.                            double minCall, boolean threeG, double minVideoCall, double minVideoMail ) {
  7.         super( name,address, telNo, noOfSms, minCall, threeG );
  8.         this.minVideoCall = minVideoCall;
  9.         this.minVideoMail = minVideoMail;
  10.     }
  11.    
  12.     public String toString() {
  13.         return super.toString() + "\nVideo Call min: " + minVideoCall + "\nVideo Mail min: " + minVideoMail;
  14.     }
  15.    
  16.     public double getTotalPremium() {
  17.         double charge = minVideoCall + super.calCharge();
  18.         return charge;
  19.     }
  20. }
Add Comment
Please, Sign In to add comment