subject

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 rationalinstance data
e. this is incorrect; they should be declared as public

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 04:00, ittmanny6138
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
image
Computers and Technology, 23.06.2019 16:30, rileysndr1782
Monica and her team have implemented is successfully in an organization. what factor leads to successful is implementation? good between different departments in an organization leads to successful is implementation.
Answers: 1
image
Computers and Technology, 24.06.2019 06:30, chloeholt123
For which utilities, if any, does the landlord pay?
Answers: 2
image
Computers and Technology, 24.06.2019 17:40, hughesnatalia2003
File i/o activity objective: the objective of this activity is to practice working with text files in c#. for this activity, you may do all code in the main class. instructions: create an app that will read integers from an input file name numbers. txt that will consist of one integer per record. example: 4 8 25 101 determine which numbers are even and which are odd. write the even numbers to a file named even. txt and the odd numbers to a file named odd. txt.
Answers: 3
You know the right answer?
Consider a rational class designed to represent rational numbers as a pair of ints, along with metho...

Questions in other subjects:

Konu
Physics, 19.10.2021 22:30