Question: create a python program for this. Create a Refund class that inherits from Netflix. This class tracks the most recent premium, family, normal, student, and

create a python program for this.
Create a Refund class that inherits from Netflix. This class tracks the most recent premium, family, normal, student, and ad subscriptions sold. The most recent transaction can be retracted and the subs sold in it can be refunded by a refund rate. Initial refund rate is 50%.
For ease, copy your code for Netflix into the code cell for this problem, and then change the encapsulation on all of its fields from private (double underscore) to protected (single underscore). For Refund, however, encapsulate the fields as private.
The Refund class must implement/override the following methods:
(1)_(self): initializes additional fields-the most recent transaction and the refund rate
(2) sellSubscriptions(self, premium, family, normal, student, ads):
if there isn't enough room, this method ends and prints "Total cost is 0.00 PHP"
otherwise, this method tracks the latest transaction, and then calls sellSubscriptions() on its superclass
(3) refund(self):
the available room is adjusted to reflect the refunded subscriptions
the cost of the most recent transaction is deducted from total sales at the refund rate
the money that was refunded this time is printed out
the tracking of what was the most recent transaction is reset to nothing
prints out "No Refund Available." if the most recent transaction has no current value
(4) updateRefundRate(self, newCost): updates the refund rate based on the value of the parameter
On a separate code cell, do the following instructions in the same sequence:
(1) Create a Refund object
(2) A customer attempts to buy 30 premium, 114 family, 308 normal, 52 student, and 17 ads
(3) A customer attempts to buy 200 premium, 109 family, 260 normal, 231 student, and 57 ads
(4) A customer attempts to buy 200 premium, 20 family, 30 normal, 10 student, and 5 ads
(5) The most recent customer refunds their tickets
(6) Someone is trying to do a refund again
(7) It is end of day
(8) Print the report
(9) Someone is trying to do a refund... SCAM!!
(10) Due to the panic that these scammers cause, refund rate is decreased to 35%
(11) A customer attempts to buy 500 premium, 309 family, 170 normal, 131 student, and 57 ads
(12) A customer attempts to buy 400 premium, 100 family, 50 normal, 100 student, and 50 ads
(13) The most recent customer refunds their tickets
(14) It is end of day
(15) Print the report
Sample Output [from the previous instructions]
Total Cost is 135,447.60PHP
Total Cost is 229,742.10 PHP
Total Cost is 85,539.00PHP
42,769.50 PHP from the most recent
transaction was refunded.
No Refund Available.
q,
Total sales so far: 407,959.20
Total Subs sold per area:
Premium: 430
Family: 243
Normal: 598
Student: 293
Ads: 79
Total expenditure: 6,274.83
q,
No Refund Available.
Total Cost is 345,242.10 PHP
Total Cost is 212,140.00PHP
74,249.00 PHP from the most recent transaction was refunded.
-EVENT-REPORT-
Total sales so far: 891,092.30
Total Subs sold per area:
Premium: 1,330
Family: 652
Normal: 818
Student: 524
Ads: 186
Total expenditure: 12,549.66
q,
create a python program for this. Create a Refund

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!