Write a Python Program A smart AC is a subclass of AC class, which relates to the Appliance superclass. The appliance class contains three private instance variables: brand name, model no, power consumption, and one method Specification(). The AC class has the following fields and methods: warranty, price, discuent, Discuent_Price(). The SmartAC class has the following fields and methods: warranty, price, discount, Regular_price(), Discount_Price(). Now perform the Followings: 1. Create an instance of the Appliance class and initialize all the fields with appropriate values. Show a specification on any instance. 2. Create two instances of the smart AC class and initialize all the fields with appropriate values. Show the operation of Regular_Price() and Discount_Price() method for both. Take the discount amount as user input.
Write a Python Program
A smart AC is a subclass of AC class, which relates to the Appliance superclass. The appliance class contains three private instance variables: brand name, model no, power consumption, and one method Specification(). The AC class has the following fields and methods: warranty, price, discuent, Discuent_Price(). The SmartAC class has the following fields and methods: warranty, price, discount, Regular_price(), Discount_Price().
Now perform the Followings:
1. Create an instance of the Appliance class and initialize all the fields with appropriate values. Show a specification on any instance.
2. Create two instances of the smart AC class and initialize all the fields with appropriate values. Show the operation of Regular_Price() and Discount_Price() method for both. Take the discount amount as user input.
Step by step
Solved in 2 steps with 1 images