Question 1 Learning objectives:
Use objects to store and compute tabular information,
Apply the principles of object-oriented programming principles in designing and developing applications
(a) The Newspaper class models one newspaper that can be subscribed. Assume that both printed and online versions are available. The class has the following attributes:
_name – An instance variable for the name of a newspaper.
_language – An instance variable for the language the newspaper articles are written in.
_ratePerMonthPrint – An instance variable for the monthly subscription rate for a printed version of the newspaper.
__init__ - The method initialises a new newspaper.
Getter methods for all instance variables and a setter method for _ratePerMonthPrint.
ratePerMonthOnline – The method returns the monthly subscription rate for an online version of the newspaper which is 50% the rate for a printed version.
__str__ – The method returns a string representation of a newspaper. E.g.,