The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 409 Weeks Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
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 keyword
arguments,
meas = FootMeasure()
meas = FootMeasure(feet = 5)
meas = FootMeasure(feet = 5, inches = 8)
meas = FootMeasure(inches = 68)
Implement special method __repr__ in the class so that measurements are displayed as follows,
5 ft. NOT 5 ft. 0 in.
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.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on-----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be-----------