Advertisement
AC_is_here

PlatinumPlan

Jul 29th, 2020 (edited)
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. public class PlatinumPlan extends HealthInsurancePlan{
  2.    
  3.     double coverage, discount;
  4.     PlatinumPlan(){
  5.         coverage = 0.9;
  6.         discount = 50.0;
  7.     }
  8.    
  9.     public double getDiscount(){
  10.         return discount;
  11.     }
  12.     //exercise states not to define same method in subclass as well
  13.     public double getCoverage(){
  14.         return coverage;
  15.     }
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement