Define a class Fraction3YourName as follows,
/**
* Program Name: Fraction3YourName.java
* Discussion: Fraction3Yourname class
* written By:
* Date: 2019/09/19
*/
public class Fraction3YourName {
private int sign;
private int num;
private int denom;
public Fraction3YourName() {
//sign = ;
//denom = ;
}
public Fraction3YourName(int n) {
//sign = ;
//num = n;
//denom = ;
}
public Fraction3YourName(int s, int n, int d) {
//sign = s;
//num = n;
//denom = d;
}
}
You are asked to
ï‚· Complete the definitions for the given constructors; and
ï‚· Provide additional method members to allow the performance offour simple
arithmetic operations: (1) Addition, (2) Subtraction, (3)Multiplication, and (4)
Division; and
ï‚· Provide one method member print() to display theFraction3YourName object.
by java programming