subject
Computers and Technology, 30.05.2020 19:02 gray69

Rational fractions are of the form a/b, in which a and b are integers and b≠0. In this exercise, by "fractions" we mean rational fractions. Suppose a/b and c/d are fractions. Arithmetic operations on fractions are defined by the following rules: ‍ ‍ ‍ Fractions are compared as follows: a/b op c/d if ad op bc, in which op is any of the relational operations. For example, a/b < c/d if ad > bc. Design a class—say, fractionType—that performs the arithmetic and relational operations on fractions. Overload the arithmetic and relational operators so that the appropriate symbols can be used to perform the operation. Also, overload the stream insertion and stream extraction operators for easy input and output. Write a C++ program that, using the class fractionType, performs operations on fractions. Among other things, test the following: Suppose x, y, and z are objects of type fractionType. If the input is 2/3, the statement should store 2/3 in x. The statement should output the value of x + y in fraction form. The statement should store the sum of x and y in z in fraction form. Your answer need not be in the lowest terms.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 20.06.2019 18:02
Is there a gpa requirement to start online schooling
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
question
Computers and Technology, 23.06.2019 05:20
Which operating system is a version of linux?
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
You know the right answer?
Rational fractions are of the form a/b, in which a and b are integers and b≠0. In this exercise, by...
Questions
Questions on the website: 13722363