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.

5 Years
Discussion Span
Last Post by JamesCherrill

What 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.

Edited by NP-complete


There are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in helping you cheat or doing your homework for you.

DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"

Post what you have done so far and someone will help you from there.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.