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, 21.06.2019 16:50
3.2.5 suppose that we have an estimate ahead of time of how often search keys are to be accessed in a bst, and the freedom to insert items in any order that we desire. should the keys be inserted into the tree in increasing order, decreasing order of likely frequency of access, or some other order? explain your answer.
Answers: 1
question
Computers and Technology, 22.06.2019 14:30
Complete the sentence based on your knowledge of the professional difficulties faced by music artists. digital technology allows audiences to see free live telecasts of music or dance performances through
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Selective is defined as paying attention to messages that are consistent with one’s attitudes and beliefs and ignoring messages that are inconsistent.
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
Social Studies, 18.11.2020 20:10
question
Mathematics, 18.11.2020 20:10
question
Social Studies, 18.11.2020 20:10
Questions on the website: 13722367