subject
Computers and Technology, 20.10.2021 21:00 yfnal3x

The class should have two private data members: a numerator and a denominator. A function that takes two integers as inputs and sets the numerator and denominator of the fraction object. The function should check that the denominator is not zero and set the fraction to 0 over 1 if the denominator is zero.
A print function that prints a fraction object as an improper fraction, e. g. 6/4.
A print function that prints a fraction object as a mixed number, e. g. 1 2/4.
A print function that prints a fraction object as a decimal, e. g. 1.5. Each of these print functions should have a different name.
An add function that adds two fractions. Or you could overload the + operator to add fractions.
A subtract function that subtracts two fractions. Or overload the - operator to subtract fractions.
A multiply function that multiplies two fractions. Or overload the * operator to multiply fractions.
A divide function that divides two fractions. Or overload the / operator to divide fractions.
Create the program in C++. Please explain!

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:30
You wanted to look up information about alzheimer's, but you were unsure if it was spelled "alsheimer's" or "alzheimer's." which advanced search strategy would be useful? a) a boolean search b) using a wild card in your search c) trying different search engines d) doing a search for "alsheimer's not alzheimer's" asap. ill give brainlist.
Answers: 1
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
question
Computers and Technology, 24.06.2019 00:50
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
Which of the following characters is acceptable to use in a filename? ? / – %
Answers: 1
You know the right answer?
The class should have two private data members: a numerator and a denominator. A function that tak...
Questions
question
Chemistry, 19.07.2020 14:01
Questions on the website: 13722367