Question: I've been working on a class that will convert hex to decimal and decimal to hex but can't manage to figure out the overloaded string

I've been working on a class that will convert hex to decimal and decimal to hex but can't manage to figure out the overloaded string operator. Any advice would be greatly appreciated.
class Hexadecimal: def decima! "10", hexadecimal "FF"): -init-(self, if type (decimal) = = is int: if decimal> 0: self. decimal -decimal else: raise ValueError ("Must be greater than zero.") if type (decimal) is list: raise ValueError ("Cannot enter lists.") if type (decimal) is float: if decimal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
