Multiple Choice
Consider a Rational class designed to represent rational numbers as a pair of ints, along with methods reduce (to reduce the rational to simplest form) , gcd (to find the greatest common divisor of two ints) , as well as methods for addition, subtraction, multiplication, and division. Why should the reduce and gcd methods be declared to be private?
A) because they will never be used
B) because they will only be called from methods inside Rational
C) because they will only be called from the constructor of Rational
D) because they do not use any of the Rational instance data
E) This is incorrect; they should be declared as public
Correct Answer:

Verified
Correct Answer:
Verified
Q1: Java methods can only return primitive types.
Q4: The software failure at the Denver International
Q5: Class Definition Ch04-2<br>The following is from a
Q6: In order to preserve encapsulation of an
Q7: The following method header definition will result
Q8: The behavior of an object is defined
Q9: Given the method defined here, which of
Q10: Class Definition Ch 04-4<br>public class Box<br>{<br>double length;<br>double
Q19: Formal parameters are those that appear in
Q22: Having multiple class methods of the same