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
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 implementoverride the following methods:
self: initializes additional fieldsthe most recent transaction and the refund rate
sellSubscriptionsself premium, family, normal, student, ads:
if there isn't enough room, this method ends and prints "Total cost is PHP
otherwise, this method tracks the latest transaction, and then calls sellSubscriptions on its superclass
refundself:
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
updateRefundRateself 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:
Create a Refund object
A customer attempts to buy premium, family, normal, student, and ads
A customer attempts to buy premium, family, normal, student, and ads
A customer attempts to buy premium, family, normal, student, and ads
The most recent customer refunds their tickets
Someone is trying to do a refund again
It is end of day
Print the report
Someone is trying to do a refund... SCAM!!
Due to the panic that these scammers cause, refund rate is decreased to
A customer attempts to buy premium, family, normal, student, and ads
A customer attempts to buy premium, family, normal, student, and ads
The most recent customer refunds their tickets
It is end of day
Print the report
Sample Output from the previous instructions
Total Cost is
Total Cost is PHP
Total Cost is
PHP from the most recent
transaction was refunded.
No Refund Available.
Total sales so far:
Total Subs sold per area:
Premium:
Family:
Normal:
Student:
Ads:
Total expenditure:
No Refund Available.
Total Cost is PHP
Total Cost is
PHP from the most recent transaction was refunded.
EVENTREPORT
Total sales so far:
Total Subs sold per area:
Premium:
Family:
Normal:
Student:
Ads:
Total expenditure:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
