Fraction Calculator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Fraction Calculator

How to code this using netbeans? class = Fraction public int getNumerator(){ public int getDenominator(){ public String toString(){ Public String toDouble(){ Public Fraction add(Fraction other){ Public Fraction sub(Fraction other){ Public Fraction mul (Fraction other){ Public Fraction div (Fraction other){ Public Fraction equals(object other){ public void toLowestTerms(){ public int gcd (int num, int den){ with main class Public string getOperation(Scanner input){ Public boolean validFrc =action(strong input){ Public fraction getFraction(Scanner input){

22nd Sep 2020, 6:17 AM
Charlene Allysa Razon
Charlene Allysa Razon - avatar
2 Answers
22nd Sep 2020, 7:13 AM
JaScript
JaScript - avatar
+ 2
With wizard can be created the main class. The second class by small projects at the beginnig can be written in the same data file with the main class. In addition will be needed the imports depending of your code. You can see how, as follows: https://code.sololearn.com/cQsYmxH6Lx2u/?ref=app https://code.sololearn.com/cM6uUMlG42zK/?ref=app
22nd Sep 2020, 10:52 AM
JaScript
JaScript - avatar