Question: java sub - This method should receive a single rational number as a parameter. It should subtract the parameter from the current (this) object and

java
java sub - This method should receive a single rational number as

sub - This method should receive a single rational number as a parameter. It should subtract the parameter from the current (this) object and return the answer as a new rational number object. Neither the current object, nor the parameter should be changed by this method. For example, suppose x is the rational number "3/4", and y is the rational number "5/6", and z is a rational number. The command z = y.sub (x) should return the rational number "2/24" and store it in z. x should not be changed by this method, and y should not be changed by this method mul - This method should receive a single rational number as a parameter. It should multiply the current (this) object by the parameter and return the answer as a new rational number object. Neither the current object, nor the parameter should be changed by this method. div - This method should receive a single rational number as a parameter. It should divide the current (this) object by the parameter and return the answer as a new rational number object. Neither the current object, nor the parameter should be changed by this method

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!