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 29 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
YES! Correct, THANKS for helping me on my review


dreamfighter72

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

 

Did you know?

Many people have small pouches in their colons that bulge outward through weak spots. Each pouch is called a diverticulum. About 10% of Americans older than age 40 years have diverticulosis, which, when the pouches become infected or inflamed, is called diverticulitis. The main cause of diverticular disease is a low-fiber diet.

Did you know?

Ether was used widely for surgeries but became less popular because of its flammability and its tendency to cause vomiting. In England, it was quickly replaced by chloroform, but this agent caused many deaths and lost popularity.

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.

Did you know?

Most fungi that pathogenically affect humans live in soil. If a person is not healthy, has an open wound, or is immunocompromised, a fungal infection can be very aggressive.

Did you know?

The human body produces and destroys 15 million blood cells every second.

For a complete list of videos, visit our video library