Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. //Class for the Silver Account
  2. public class SilverAccount extends BronzeAccount {
  3. SilverAccount(double weekday, double weekend, double megabytes){
  4. super(weekday, weekend, megabytes);
  5. }
  6. public double getTotalCostEnd(){
  7. return 0.00;
  8. }
  9.  
  10. public double geTotalCostMB(){
  11. if (megabytes <= 1000){
  12. return 0.00;
  13. }else {
  14. return (megabytes - 1000)*0.01;
  15. }
  16. }
  17. public double geTotalCost(){
  18. return 46 + getTotalCostDay() + getTotalCostEnd() + geTotalCostMB();
  19. }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement