Question: c++ 4. Write a class machine and washing machine. Class washing machine should inherit from class machine . Attributes of the machine will be name,
4. Write a class "machine" and "washing machine". Class "washing machine" should inherit from class "machine" . Attributes of the machine will be name, type, year. The washing_machine should have the attributes: volume, depth, weight. In both classes should be method "show_attributes" which prints the attributes. Demonstrate in main function the usage of these classes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
