Question: write a code inc++ Question no 1. - Consider the arithmetic operators. These are already familiar notations from algebra and earlier int x=3,y=6,z; float a=3.4,b=2.1,c;

write a code inc++
Question no 1. - Consider the arithmetic operators. These are already familiar notations from algebra and earlier int x=3,y=6,z; float a=3.4,b=2.1,c; z=x+y;c=a/b; Now consider this notation. This should also be familiar from high school or earlier: 1/2+1/3//evaluatesto5/6 2/31/3//evaluatesto1/3 - Now, what about using arithmetic operators on our fraction class (a user-defined type): Fraction n1,n2,n3; n3=n1+n2 It should be clear that this would not make sense to the compiler. Fraction is a programmerdefined type. Using the operator overloading write a program and make this possible
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
