Question: Need help with the following Java program . Class name Fraction.java Fraction has only 2 inputs of integers : numerator and denominator. Programmers must provide
Need help with the following Java program.
Class name Fraction.java
- Fraction has only 2 inputs of integers : numerator and denominator.
- Programmers must provide all necessary constructors for users. In the new type Fraction, there are the following cases:
- Fraction(int n, ind d) where n and are inputted.
- Fraction(int n) //only one parameter
- Fraction() //No parameter
- Fraction(String s) //only one parameter of type String
- Programmer must display the fractions in their conventions such as
- 2/4 should be displayed as 1/2 (note: gcd)
- 3/1 should be displayed as 3
- 5/2 should be displayed as 2 1/2
- 4 should be displayed as 4/1
- Furthermore, programmers must correct the typos of unique interpretation such as
- l (lowercase of capital L) is 1
- O (capital o) is 0 (zero)
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
