Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
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 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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started