Question: pls write a program in c++. for; --> Design a new class to represent a fraction (a ration of two integer values) 15 22 -

pls write a program in c++.

for; -->

pls write a program in c++. for; --> Design a new class

Design a new class to represent a fraction (a ration of two integer values) 15 22 - - Numerator Denominator The data members of the class Fraction are two integers top and bottom, denoting the numerator and denominator, respectively class Fraction private: // Numerator // Denominator 4 int top; int bottom; public: Part 1: Fundamental requirements for the class Fraction. 1. Fractional numbers can be declared with both a numerator and denominator, or simple numerator: Fraction a; Fraction b(3,4); Fraction c(5); // represents 0/1 // represents 3/4 // represents 5/1 2. Fractions should be able to act just like other numbers. Add, subtract, multiple and divide; Compare based on values; Input and output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!