the answer of Write a class for rational numbers. A rational number is quotient of two integers, such as 2/3 or 1/2. Your class should have three constructors. One constructor takes no argument, and initializes the rotational number to 0. Another constructor takes a numerator only (the denominator is assumed to be 1). The third constructor takes both a numerator and denominator. Your class should have methods for adding, subtracting, multiplying and dividing rational numbers.
norsalwani.shasa
0
Newbie Poster
Recommended Answers
Jump to PostWhat have you done so far?
If you haven't, then start on something. We are not here to do your homework. We are here to help you in case you get stuck.
All 2 Replies
NP-complete
42
Junior Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.