Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++, Iostream, using namespace std, NO POINTERS Create a class to handle fractions, using multiple .cpp files and appropriate .h file. Both the numerator and

C++, Iostream, using namespace std, NO POINTERS

image text in transcribed

Create a class to handle fractions, using multiple .cpp files and appropriate .h file. Both the numerator and denominator are integers, positive or negative. Your class must have a default constructor that uses a constructor list to initialize the values. The fraction must default to 1/1 Overload operators ,+, - so they work with your Fraction class. You will most likely need to create a private method to convert fractions to a common denominator so that, for example, the class can work with 1/2 and -4/-8, and another private method to reduce the fraction to lowest form (4/8 would print as 1/2). All output should show the fraction in lowest form I need a method to display the 4 and denominator 7 then it should display 4/7. Bonus points (1ea) for overloading *, /

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions