Question: Write a fraction class in c++. Will need the header and cpp files. Requirements: The class must have 3 types of constructors covered in lecture
Write a fraction class in c++.
Will need the header and cpp files.
Requirements:
The class must have 3 types of constructors covered in lecture 1: default, overloaded with initializer list, copy constructor
You must overload the assignment operator.
You must declare the overloaded output operator as a friend rather than part of the class
The Fraction class should implement addition, subtraction, multiplication, division and simplify operations.
Write a main function in a separate file to test each functionality and show that they work.
Thank You.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
