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 38 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
Excellent


tuate

  • Member
  • Posts: 332
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

The average person is easily confused by the terms pharmaceutics and pharmacology, thinking they are one and the same. Whereas pharmaceutics is the science of preparing and dispensing drugs (otherwise known as the science of pharmacy), pharmacology is the study of medications.

Did you know?

Bacteria have flourished on the earth for over three billion years. They were the first life forms on the planet.

Did you know?

In the United States, an estimated 50 million unnecessary antibiotics are prescribed for viral respiratory infections.

Did you know?

Less than one of every three adults with high LDL cholesterol has the condition under control. Only 48.1% with the condition are being treated for it.

Did you know?

Oxytocin is recommended only for pregnancies that have a medical reason for inducing labor (such as eclampsia) and is not recommended for elective procedures or for making the birthing process more convenient.

For a complete list of videos, visit our video library