Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Class for the Silver Account
- public class SilverAccount extends BronzeAccount {
- SilverAccount(double weekday, double weekend, double megabytes){
- super(weekday, weekend, megabytes);
- }
- public double getTotalCostEnd(){
- return 0.00;
- }
- public double geTotalCostMB(){
- if (megabytes <= 1000){
- return 0.00;
- }else {
- return (megabytes - 1000)*0.01;
- }
- }
- public double geTotalCost(){
- return 46 + getTotalCostDay() + getTotalCostEnd() + geTotalCostMB();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement