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, 22.06.2019 15:00
Hyperactive media sales has 10 windows 7 laptop computers used by sales-people in the organization. each laptop computer has several customized applications that are used during the sales process as well as customer relationship management software. all of the applications on the laptops are difficult to configure and have large data files. if all of the laptops have current hardware, what is the easiest way to install windows 10 on them?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What is the name of the sound effect that danny hears
Answers: 1
question
Computers and Technology, 23.06.2019 18:40
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
You know the right answer?
The class should have two private data members: a numerator and a denominator. A function that tak...
Questions
question
English, 03.07.2019 03:30
question
Mathematics, 03.07.2019 03:30
Questions on the website: 13722361