Question: Program description Complete Frac.h attached below And Frac.cpp (attached below) To implement the required functions. Create a class called Fraction for performing arithmetic with fractions.
Create a class called Fraction for performing arithmetic with fractions. Use integer variables to represent the private data of the class-the numerator and the denominator. Provide a constructor function that enables an object of this class to be initialized when it is declared. The constructor should contain default values in case no initializers are provided. Provide public member functions for each of the following: Addition of two Fraction numbers. See the solution as an example in Frac.cpp. Subtraction of two Fraction numbers. Multiplication of two Fraction numbers. Division of two Fraction numbers. Printing Fraction numbers in the form a/b where a is the numerator and b is the denominator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
