This topic contains a solution. Click here to go to the answer

Author Question: Consider a Rational class designed to represent rational numbers as a pair of int's, along with ... (Read 30 times)

Tirant22

  • Hero Member
  • *****
  • Posts: 532
Consider a Rational class designed to represent rational numbers as a pair of int's, along with methods reduce (to reduce the rational to simplest form), gcd (to find the greatest common divisor of two int's), as well as methods for addition, subtraction, multiplication, and division.  Why should the reduce and gcd methods be declared to be private.
◦ Because they will never be used
◦ Because they will only be called from methods inside of Rational
◦ Because they will only be called from the constructor of Rational
◦ Because they do not use any of Rational's instance data
◦ Because it is a typo and they should be declared as public


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by Tirant22 on Aug 30, 2020

karlss

  • Sr. Member
  • ****
  • Posts: 321
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 35% of students answer this correctly




Tirant22

  • Member
  • Posts: 532
Reply 2 on: Aug 30, 2020
Thanks for the timely response, appreciate it


kusterl

  • Member
  • Posts: 315
Reply 3 on: Yesterday
Excellent

 

Did you know?

Drugs are in development that may cure asthma and hay fever once and for all. They target leukotrienes, which are known to cause tightening of the air passages in the lungs and increase mucus productions in nasal passages.

Did you know?

Side effects from substance abuse include nausea, dehydration, reduced productivitiy, and dependence. Though these effects usually worsen over time, the constant need for the substance often overcomes rational thinking.

Did you know?

Astigmatism is the most common vision problem. It may accompany nearsightedness or farsightedness. It is usually caused by an irregularly shaped cornea, but sometimes it is the result of an irregularly shaped lens. Either type can be corrected by eyeglasses, contact lenses, or refractive surgery.

Did you know?

Your skin wrinkles if you stay in the bathtub a long time because the outermost layer of skin (which consists of dead keratin) swells when it absorbs water. It is tightly attached to the skin below it, so it compensates for the increased area by wrinkling. This happens to the hands and feet because they have the thickest layer of dead keratin cells.

Did you know?

Long-term mental and physical effects from substance abuse include: paranoia, psychosis, immune deficiencies, and organ damage.

For a complete list of videos, visit our video library