Question: Design and implement a FootMeasure class that stores a linear measurement of feet and inches. Your class should have the following function header for
Design and implement a FootMeasure class that stores a linear measurement of feet and inches. Your class should have the following function header for special method init def _init__(self, feet=0, inches =0) Thus, the class should be able to create a FootMeasure object in various ways by use of optional key- word arguments, meas FootMeasure () meas = FootMeasure (feet =5) meas meas Implement special method - Foot Measure (feet=5, inches =8) Foot Measure (inches=68) repr in the class so that measurements are displayed as follows, NOT 5 ft. 0 in. 5 ft. 5 ft. 8 in. NOT 68 in. When the measurement is 0, it should be displayed as, 0 ft. 0. ins. Include special method add () for adding FootMeasure values. Also include all the special methods for implementing the relational Operators.
Step by Step Solution
There are 3 Steps involved in it
Heres a Python class FootMeasure that meets your requirements including the init repr add and relati... View full answer
Get step-by-step solutions from verified subject matter experts
