A C++ class to handle fraction including the following features
- Store negative and positive fractions, in fractional form (decimal approximations will not be made);
- Store the fraction in normalized or reduced form;
- Overload the following unary operators to apply to fractions
-
- (negation)
- ++ (post-increment)
- ++ (pre-increment)
- Overload the following binary operators to apply to fractions
-
- (addition)
-
- (subtraction)
-
- (multiplication)
- / (division)
- += (addition and assignment)
- <, <=, ==, !=, >=, > (comparison)
- << (used with cout)
-
(used with cin)