1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nimfa-mama [501]
3 years ago
12

Write an instance method in Rational called add that takes a Rational number as an argument, adds it to this, and returns a new

Rational object. There are several ways to add fractions. You can use any one you want, but you should make sure that the result of the operation is reduced so that the numerator and denominator have no common divisor (other than 1).
Computers and Technology
1 answer:
ExtremeBDS [4]3 years ago
8 0

Answer:

Explanation:

I do not have the Rational class but based on the information provided, the following class has been tested and does what is requested. It can simply be added to the Rational class and it will work fine. Due to technical difficulties I had to add the instance method as an attachment in a text file down below.

Download txt
You might be interested in
Which best describes the benefits of renting a home?
WARRIOR [948]
The benefits are that you don't have to worry if something breaks from like a water leake or a storm and get destroyed the home owners have to pay
7 0
4 years ago
Read 2 more answers
A man travel 200m towards east<br />from his house then takes left<br />to turn and moves 200 m north<br />fin
11Alexandr11 [23.1K]
Using the Pythagorean theorem:

200^2 + 200^2 = x^2

x = 282.842712... from the original distance
4 0
4 years ago
​When converting plain text to hexadecimal for use with ProDiscover, you need to place ____________ between each character's hex
mina [271]

Answer:

Null(00) is the correct answer to the following blank.

Explanation:

Because when we changing the plain text into the hexadecimal then, we have to place null(00) to use with pro-discover in the middle of each and every hexadecimal value. We use null(00) because the null value contains 0(zero) or having no value.

So, that's why the following answer i.e., null(00) is true.

3 0
4 years ago
• Open your Netbeans IDE and answer the following question
VARVARA [1.3K]

Answer:

public static void main(String[] args)

   {

       int cdCount;

       double cdCountAfterDiscount;

       DecimalFormat df = new DecimalFormat("$##.##"); // Create a Decimal Formatter for price after discount

       System.out.println("Enter the amount of CD's bought");

       Scanner cdInput = new Scanner(System.in);  // Create a Scanner object

       cdCount = Integer.parseInt(cdInput.nextLine());  // Read user input

       System.out.println("CD Count is: " + cdCount);  // Output user input

       if(cdCount <= 14 )

       {

           System.out.println("There is no discount");

           System.out.println("The final price is " + cdCount*3.5);

       }

       if(cdCount >= 15 && cdCount<=50)

       {

           System.out.println("You have a 1% discount.");

           cdCountAfterDiscount = (cdCount *3.5)-(3.5*.01);

           System.out.println("The final price is " + df.format(cdCountAfterDiscount));

       }

       if(cdCount >= 51 && cdCount<120)

       {

           System.out.println("You have a 5% discount.");

           cdCountAfterDiscount = (cdCount *3.5)-(3.5*.05);

           System.out.println("The final price is " + df.format(cdCountAfterDiscount));

       }

       if(cdCount >= 120)

       {

           System.out.println("You have a 10% discount.");

           cdCountAfterDiscount = (cdCount *3.5)-(3.5*.1);

           System.out.println("The final price is " + df.format(cdCountAfterDiscount));

       }

   }

8 0
3 years ago
Mainframe computers have several CPUs, have very fast processor speeds, can supporting multiple operating systems and have huge
Marrrta [24]

Answer:

True.

Explanation:

Mainframe computers were developed and introduced in the early 1950s.

Mainframe computers have several CPUs, have very fast processor speeds, can supporting multiple operating systems and have huge amounts of storage capacity. As a result, mainframe computers are mostly or commonly used by large companies, business firms or governmental institutions for performing various complex tasks such as census, financial transactions, e-commerce, data sequencing, enterprise resource planning, etc.

7 0
3 years ago
Other questions:
  • Dave has to create animations for a game. Which tool can Dave use?
    9·2 answers
  • Two technicians are explaining automotive computer control. Technician A says that the volt is used as a signal for a computer-c
    13·2 answers
  • What stdio.h input function would be used to get input from the user by the keyboard? Write the code to obtain the voltage drop
    7·1 answer
  • Why is my computer acting up?
    14·1 answer
  • If you write a toString method to display the contents of an object, object1, for a class, Class1, then the following two statem
    7·1 answer
  • Based on the Pizza database you imported, complete the SQL statement below to add the column VIP to the customers table. The cus
    8·1 answer
  • Was Google right to have entered the Chinese market the way it did? Did Googleâs mission compel it to create Google.cn? What spe
    9·1 answer
  • You are working for a company that is responsible for determining the winner of a prestigious international event, Men’s Synchro
    5·1 answer
  • To uncompress the data back into its original binary state, you simply reverse the process. This technique is an example of what
    7·1 answer
  • Your connection to this site is not secure how to fix.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!