Question: write a class in python called chair that _init__(self,a,b,c) : Saves the arguments as attributes. Returns ValueError if a b c are negative, or if
write a class in python called chair that
_init__(self,a,b,c) : Saves the arguments as attributes.
Returns ValueError if a b c are negative, or if the sum is not equal to 500
and also
__eq__(self,other) : Takes another Chair object and returns True if this Chair and that one have the same a , b , and c components. This special method provides overloading of the operator == , so that expressions like a == b and a != b will work if a and b are Chair objects
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
